I'm trying to use the typescriptServices.d.ts and typescriptServices.js that from built\local after running jake local. I'm trying to use them in a Node.js app, but I'm getting confused how to require them.
1: Module cannot be aliased to a non-module type.

2: Duplicate identifier 'TypeScript'.

3: Compiles & Runs, but missing IntelliSense
If I wrap the code in an export function it compiles and runs, but I have to comment out var TypeScript = require('./typescriptServices'); in order for IntelliSense to work. Bug in IntelliSense?

4: Use aliases as workaround
This restores IntelliSense in the function, but IntelliSense doesn't work when writing the import statement unless I comment out the require line.

Code is from TypeScript: get syntax tree.