OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How to do re-export with overrides?

  • Thread starter Thread starter unional
  • Start date Start date
U

unional

Guest
Code:
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;

Code:
import { a, b, c, d, e, ..... } from 'some-library'
export { a, b, c, d, e, .... }
export * from './myOverrides'

<pre><code>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
</code></pre>

<p>I would like to avoid picking out all named exports just to re-export them;</p>

<pre><code>import { a, b, c, d, e, ..... } from 'some-library'
export { a, b, c, d, e, .... }
export * from './myOverrides'
</code></pre>
 

Latest posts

J
Replies
0
Views
1
Jeff P Chacko
J
Top