Module literal name

Jonathan Bond-Caron jbondc at gdesolutions.com
Tue Jun 25 06:22:26 PDT 2013


I've been experimenting with the modules definition and find it unfortunate there's no default literal name for a module.

Could there be an optional 'namespace' or literal name within the module block?
module "classes/foo" {
     namespace foo;

     export class bar {}
}

import "classes/foo"; // use default namespace
new foo.bar();

module ns from "classes/foo" ; // alternative namespace
new ns.bar();

Some more examples here:
https://github.com/jbondc/ECMAScript/blob/master/index.html


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130625/c66812b0/attachment-0001.html>


More information about the es-discuss mailing list