calvin.metcalf at gmail.com
Thu Jun 19 03:41:18 PDT 2014
One other option could be for import name from 'path' to resolve to the
module body there is no default export, thanks to the static analysis
you'll always know when default is present.
The import 'path'/this.get syntax is a lot less burdensome if it's only
required by edge cases like needing both default export and all the named
On Jun 19, 2014 6:32 AM, "Michał Gołębiowski" <m.goleb at gmail.com> wrote:
> Thanks, Dave, for bringing that up, it shows you're open for feedback.
> That said (bikeshed begins), what's wrong with:
> import "fs" as fs;
> ? I feel that a lot of effort went in ES6 into reducing boilerplate via
> e.g. arrow functions, classes etc. but if you start with Node's require,
> this adds clutter. Compare these 3 forms of importing all the module
> "lodash" bindings to an object _:
> var _ = require("lodash"); // Node
> import * as _ from "lodash"; // Dave's syntax
> import "lodash" as _;
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss