There are often situations where the export of a module is only needed as
an argument to another function, or for its return value.

```js
import _temp1 from 'debug';
let debug = _temp1('foo');

import {readFile as _temp2} from 'fs';
let readFile = promisify(_temp2);

import _temp3, {Router} from 'express';
let app = _temp3();
```

This juggling could be avoided by allowing usage of the exports without
binding them locally. Something like this:

```js
import {default with default('foo') as debug} from 'debug';

import  {readFile with promisify(readFile) as readFile} from 'fs';

import {Router, default with default() as app} from 'express';
```

Has this been brought up before? Thoughts?
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to