Single import from modules without default export

Marius Gundersen gundersen at gmail.com
Wed Aug 6 04:56:16 PDT 2014


On Wed, Aug 6, 2014 at 1:04 PM, Kevin Smith <zenparsing at gmail.com> wrote:

>
>> It would be great if we could have single export modules without using
>> the `default` keyword to mark the exported binding as being special. One
>> way to do this is for method A (import without curly braces) to import the
>> first exported binding from the module, no matter how many named bindings
>> the module has.
>>
>
> Better yet, just get rid of the "default" business which (apparently) has
> no rational basis only adds clutter and confusion to the language core.
>
>
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`.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140806/74fcb35a/attachment-0001.html>


More information about the es-discuss mailing list