ModuleImport

Axel Rauschmayer axel at rauschma.de
Fri Jun 20 03:39:05 PDT 2014


On Jun 20, 2014, at 11:36 , Sébastien Cevey <seb.cevey at guardian.co.uk> wrote:

> Reading Marius' email, I realised what I find confusing in the newly
> proposed syntax that uses `*' to import the default export.
> 
> The `*' symbol universally represents a glob of "everything", but when
> used to import from a module that has multiple exports, you won't get
> everything, you will get either the single default export (if there is
> one) or nothing.

What gives you that impression? Quoting David’s original email:

```js
import * as fs from "fs"; // importing the named exports as an object
import Dict from "dict";  // importing a default export, same as ever
```

> As a final note, and at the risk of erring in the world of speculation
> that Brendan fears, are we just sleepwalking towards pushing people to
> work around the whole debate with the "universal":

“are we just sleepwalking” – what are you implying?

Axel

-- 
Dr. Axel Rauschmayer
axel at rauschma.de
rauschma.de



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140620/5790d01d/attachment-0001.html>


More information about the es-discuss mailing list