title: Node.js + TypeScript: Unclear syntax with type script compiled code
body: <p>I'm trying to work with TypeScript in my node project, but I have some issues with that.</p>
  <p>This is my <em>index.ts</em> file:</p>
  <pre><code>import express from 'express';
  
  const app = express();
  </code></pre>
  <p>I'm running:</p>
  <pre><code>tsc --module commonsjs -d index.ts
  </code></pre>
  <p>My output is <em>index.js</em>:</p>
  <pre><code>var express_1 = require('express');
  var app = express_1[&quot;default&quot;]();
  </code></pre>
  <p>Where did this <code>[&quot;default&quot;]</code> came from? It is making my code not to run properly:</p>
  <pre><code>var app = express_1[&quot;default&quot;]();
                                ^
  
  TypeError: express_1.default is not a function
  </code></pre>
  <p>As far as I understand, I should have got the code without the &quot;default&quot; brackets and it would have worked fine - I tried removing the brackets and it worked.</p>
  <p>What am I missing here?</p>