restrictions on module import export names

Domenic Denicola domenic at
Wed Jan 29 15:30:54 PST 2014

You cannot have a declaration with "default" as the IdentifierName, since that is a reserved word. So `export let default = foo();` is not possible.

From: es-discuss <es-discuss-bounces at> on behalf of Calvin Metcalf <calvin.metcalf at>
Sent: Wednesday, January 29, 2014 18:25
To: Jason Orendorff
Cc: EcmaScript; Erik Arvidsson
Subject: Re: restrictions on module import export names

So the following are equivalent?

export default foo();
export let default = foo();

On Jan 29, 2014 5:19 PM, "Jason Orendorff" <jason.orendorff at<mailto:jason.orendorff at>> wrote:
On Wed, Jan 29, 2014 at 2:00 PM, Erik Arvidsson
<erik.arvidsson at<mailto:erik.arvidsson at>> wrote:
> `export default 1` works.
> ExportDeclaration :
>   export default AssignmentExpression ;

I think that just exports the value 1 with the name "default".

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list