Is It Possible To Export The Result Of "import * As" In Es2015?
In ES2015, it's possible to import an entire module as an object whose properties are the module's exports: import * as name from 'module'; I find this to be extraordinarily usefu
Solution 1:
No, this was simply missed in ES6. There is a stage 1 proposal to add these, though, and rollup will consider implementing it.
Until then, you will need to use two declarations and a local binding, altough there's no need to clone the object:
import * as name from'module';
export { name };
Post a Comment for "Is It Possible To Export The Result Of "import * As" In Es2015?"