Rationale for dropping ModuleImport syntax?
gundersen at gmail.com
Mon Jun 9 14:01:35 PDT 2014
On Mon, Jun 9, 2014 at 7:40 PM, Karolis Narkevičius <karolis.n at gmail.com>
> Why can't we have both with the same syntax?
> // imports a function which is the default export
> import mkdirp from "mkdirp";
> // imports all named exports, like module used to
> import fs from "fs";
According to the spec  (IIUC) you can import both all/some of the named
export values and the default export value, due to the second option of the
ImportedBinding , NamedImports
Does this mean that a module can export both a default value and several
named values? If so, libraries like Underscore would need to use both
namedExport and defaultExport to suite all users.
Or would the default value be an object containing all the named export
values? If so, it seems like your suggestion is already in the spec.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss