Single import from modules without default export

Kevin Smith zenparsing at
Wed Aug 6 05:10:50 PDT 2014

> Completely agree, the default should be removed. This is simply a proposal
> of how we can still have a simple import statement (`import $ from
> "jQuery";`) without needing `default`.
You know, I hate even suggesting any syntax changes at this point, but if
we ditched the whole "default" thing, we could probably also get rid of the

    import readFile, writeFile from "node:fs";

And then "* as" would fit in naturally:

    import * as FS, readFile from "node:fs";

I think this might result in on overall better user experience.  I'll
experiment with this from a parsing standpoint.

What would you think about that?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list