Module Default Export Syntax

Kevin Smith zenparsing at gmail.com
Tue Jun 24 20:45:45 PDT 2014


>
>
>     ExportDeclaration:
>         ...
>         export default ClassDeclaration
>         export default FunctionDeclaration
>         export default GeneratorDeclaration
>         export default = AssignmentExpression
>
>
To reply to myself (since no one else appears to be interested), I think it
might even be best to drop these special forms altogether.  The non-sugared
form of:

    export { someVar as default };

is already very concise, and will help developers understand what this
whole "default" thing is about.  The sugar appears to be obfuscating the
design, and is doing more harm than good.

Again, thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140624/4adb29b2/attachment.html>


More information about the es-discuss mailing list