khs4473 at gmail.com
Sun Dec 9 20:30:49 PST 2012
> Since it is just sugar, and supposed to be equivalent to the
> expansion, you (fortunately) would get an error (statically).
OK, then suppose we have these two separate forms:
import x from "url"; // Bind x to the anonymous export, if defined,
import module x from "url"; // Bind x to the module instance
In the vast majority of cases the "module" keyword above can be inferred
correctly at link-time based on whether or not there is an anonymous export
in the target module.
If it were important for the user to disambiguate in those rare cases, and
load the module instance instead of the anonymous export, then she could
simply provide the optional "module" keyword.
Does that work?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss