I would really encourage you to read the spec grammar. > ```js > export foo(); > ```
This is not allowed by the grammar; there is no form `export <expression>` > ```js > export default let a = [thing1, thing2]; > ``` This is not allowed by the grammar; `let a = [thing1, thing2]` is not an AssignmentExpression. > ```js > let app = module.exports = require('express')(); > ``` Try ```js import express from "express"; let app = express(); export default app; ``` From: Calvin Metcalf [mailto:calvin.metc...@gmail.com] Sent: Wednesday, January 29, 2014 21:46 To: Jason Orendorff Cc: Domenic Denicola; Erik Arvidsson; EcmaScript Subject: Re: restrictions on module import export names ok so would this be accurate https://gist.github.com/calvinmetcalf/8701624 ? the syntax does make it impossible to write something equivalent to ```js let app = module.exports = require('express')(); ``` On Wed, Jan 29, 2014 at 6:40 PM, Jason Orendorff <jason.orendo...@gmail.com> wrote: On Wed, Jan 29, 2014 at 3:39 PM, Calvin Metcalf <calvin.metc...@gmail.com> wrote: > *would be equivalent of it was allowed > >[...] >> So the following are equivalent? >> >> ```js >> export default foo(); >> export let default = foo(); >> ``` Yes. -j -- -Calvin W. Metcalf _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss