Why is "export default var a = 1;" invalid syntax?
zenparsing at gmail.com
Tue Dec 16 06:18:00 PST 2014
> It does both. 'a' is rebound to 2 and since the export name 'default'
> associates to 'a', any subsequent references in other modules tht are
> linked to the default export of this module will also see 2 because
> 'default' is really just the export name for 'a'.
Ah - got it. That makes sense.
I still agree with Dave and Brendan: it would have been more clear if the
expression form `export default AssignmentExpression` had the "=" in there.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss