export * form 'some-library'
export * from './myOverrides'
// error: [ts] Module 'some-module' has already
// exported a member named 'someFunc'.
// Consider explicitly re-exporting to resolve the ambiguity.
import * as SomeLib from 'some-library'
import * as MyOverrides from './myOverrides'
export { ...SomeLib, ...MyOverrides } // syntax error
const Overridden = { ...someLib, ...MyOverrides } // works
export { ...Overridden } // syntax error
I would like to avoid picking out all named exports just to re-export them;
import { a, b, c, d, e, ..... } from 'some-library'
export { a, b, c, d, e, .... }
export * from './myOverrides'
From Guy Sensei:
https://github.com/systemjs/systemjs/issues/1031#issuecomment-171262430
I need to:
import { theFunction } from './myOverrides'
export * from 'some-library'
export { theFunction }
This works because local exports take priority.
I found this to work quite nicely:
import * as packageA from "packageA";
import * as packageB from "packageB";
export default { ...packageA, ...packageB };
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With