title: How do I require the typescriptServices.d.ts in a Node.js app?
body: <p>I'm trying to use the typescriptServices.d.ts and typescriptServices.js that from built\local after running <code>jake local</code>. I'm trying to use them in a Node.js app, but I'm getting confused how to require them.</p>
  <h3>1: Module cannot be aliased to a non-module type.</h3>
  <p><img src="https://i.stack.imgur.com/t15BW.png" alt="enter image description here" /></p>
  <h3>2: Duplicate identifier 'TypeScript'.</h3>
  <p><img src="https://i.stack.imgur.com/FbHRm.png" alt="enter image description here" /></p>
  <h3>3: Compiles &amp; Runs, but missing IntelliSense</h3>
  <p>If I wrap the code in an <code>export function</code> it compiles and runs, but I have to comment out <code>var TypeScript = require('./typescriptServices');</code> in order for IntelliSense to work. Bug in IntelliSense?</p>
  <p><img src="https://i.stack.imgur.com/nwBtK.png" alt="enter image description here" /></p>
  <h3>4: Use aliases as workaround</h3>
  <p>This restores IntelliSense in the function, but IntelliSense doesn't work when writing the import statement unless I comment out the require line.</p>
  <p><img src="https://i.stack.imgur.com/8JWoi.png" alt="enter image description here" /></p>
  <p>Code is from <a href="https://stackoverflow.com/questions/20187928/typescript-get-syntax-tree">TypeScript: get syntax tree</a>.</p>