title: Cannot redeclare block-scoped variable 'reducer' (typescript)
body: <p>I'm trying to run some sample code from a book and I'm getting an error <code>Cannot redeclare block-scoped variable 'reducer'</code> from the <code>tsc</code> and I'm not sure why?</p>
  
  <pre><code>tsc -v 
  // Version 2.1.0-dev.20160726
  </code></pre>
  
  <p><strong>Then I run  ts-node like so:</strong></p>
  
  <pre><code>ts-node 01-identity-reducer.ts
  </code></pre>
  
  <p><strong>01-identify-reducer.ts:</strong></p>
  
  <pre><code>interface Action {
    type: string;
    payload?: any;
  }
  
  interface Reducer&lt;T&gt; {
    (state: T, action: Action): T;
  }
  
  let reducer: Reducer&lt;number&gt; = (state: number, action: Action) =&gt; {
    return state;
  };
  
  console.log( reducer(0, null) ); // should output -&gt; 0
  </code></pre>
  
  <p><strong>ERROR</strong></p>
  
  <pre><code>    TSError: ⨯ Unable to compile TypeScript
  01-identity-reducer.ts (10,5): Cannot redeclare block-scoped variable 'reducer'. (2451)
      at getOutput (/Users/person/.nvm/versions/node/v5.0.0/lib/node_modules/ts-node/src/index.ts:258:17)
      at /Users/person/.nvm/versions/node/v5.0.0/lib/node_modules/ts-node/src/index.ts:267:16
      at Object.compile (/Users/person/.nvm/versions/node/v5.0.0/lib/node_modules/ts-node/src/index.ts:403:17)
      at loader (/Users/person/.nvm/versions/node/v5.0.0/lib/node_modules/ts-node/src/index.ts:289:33)
      at Object.require.extensions.(anonymous function) [as .ts] (/Users/person/.nvm/versions/node/v5.0.0/lib/node_modules/ts-node/src/index.ts:306:14)
      at Module.load (module.js:356:32)
      at Function.Module._load (module.js:311:12)
      at Function.Module.runMain (module.js:457:10)
      at Object.&lt;anonymous&gt; (/Users/person/.nvm/versions/node/v5.0.0/lib/node_modules/ts-node/src/_bin.ts:179:12)
      at Module._compile (module.js:425:26)
  </code></pre>