(I’m happy with David’s proposal, but I’d like to try bikeshedding one more
time.)
Building on an idea by Kevin Smith: how about supporting default exports
without any explicit syntactic constructs? The convention would be: the name
`"_"` is used for default exports. The following is a single-export module.
```js
// lib/MyClass.js - alternative A
export const _ = class {
...
};
// lib/MyClass.js - alternative B
export class _ {
...
}
// main.js
import { _ as MyClass } from "lib/MyClass";
```
Importing a multi-export module:
```js
import fs from "fs";
fs.renameSync('foo.txt', 'bar.txt');
```
--
Dr. Axel Rauschmayer
[email protected]
rauschma.de
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss