> // my-class.js
> export class MyClass {
> constructor() { ... }
> method() { ... }
> }
>
> // use-class.js
> import { MyClass } from "my-class.js";
You do have redundancy in `my-class.js` and, as Marius pointed out, the
importer has to know both the name of the module and the name of the entity
inside the module. Not that big of a deal. Again, standardizing on `_` for
default exports helps, but then importing is more verbose:
// my-class.js
export class _ {
constructor() { ... }
method() { ... }
}
// use-class.js
import { _ as MyClass } from "my-class.js";
--
Dr. Axel Rauschmayer
[email protected]
rauschma.de
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss