Why to you have to specify the type of the export (let, var, const…) in ES2015?
问题 As I'm reading here, ES2015 allows you to export var , const , let , function , class and default . export var myVar1 = ...; export let myVar2 = ...; export const MY_CONST = ...; export function myFunc() { ... } export function* myGeneratorFunc() { ... } export class MyClass { ... } But I don't understand why. In my layman opinion, there should be named exports and default exports . The type of what you are exporting doesn't seem to matter. I mean, when you export default , do you specify the