title: Why to you have to specify the type of the export (let, var, const...) in ES2015?
body: <p>As I'm <a href="http://www.2ality.com/2014/09/es6-modules-final.html" rel="noreferrer">reading here</a>, ES2015 allows you to export <code>var</code>, <code>const</code>, <code>let</code>, <code>function</code>, <code>class</code> and <code>default</code>.</p>
  
  <pre><code>export var myVar1 = ...;
  export let myVar2 = ...;
  export const MY_CONST = ...;
  
  export function myFunc() {
      ...
  }
  export function* myGeneratorFunc() {
      ...
  }
  export class MyClass {
      ...
  }
  </code></pre>
  
  <p>But I don't understand why. In my layman opinion, there should be <code>named exports</code> and <code>default exports</code>.</p>
  
  <p>The type of what you are exporting doesn't seem to matter. I mean, when you <code>export default</code>, do you specify the type? No you don't, and it works. Additionally, what difference can it make to export <code>var</code> or <code>let</code>? What difference can it make to <code>export const</code>? When you import a module it's immutable anyway (AFAIK).</p>
  
  <p><strong>So, why do you have to specify the type of the export?</strong></p>