Default exports, without explicit syntactic support

Kevin Smith zenparsing at gmail.com
Thu Jun 26 07:09:35 PDT 2014


>
>
> First - I reject the idea that making the export "anonymous" is in any way
> good practice.  Frankly, naming things is essential to API design.
>

Here's a concrete example of why you should always name your exports:

    // A.js
    export class A {}

    // B.js
    export class B {}

    // main.js
    export * from "A.js";
    export * from "B.js";

If you rely on "anonymous" exports, you're going to be SOL when trying to
aggregate like this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140626/10c3d7f7/attachment.html>


More information about the es-discuss mailing list