I have a library, in one of the files i export an interface:
export interface MyInterface {
...
}
and there is a default export, which is a react component.
On an index.ts
file, I import few stuff, and re-export them:
import Something from "./Something";
import OtherStuff from "./OtherStuff";
import ExportDefault, { MyInterface } from "./QuestionFile";
export { Something, OtherStuff, ExportDefault, MyInterface };
When I compile, I get an error:
MyInterface is not exported by QuestionFile.
My goal is, whoever imports my library is able to import that type definition to use too.
Is there a better way to do that?
if I do:
export * from "./QuestionFile"
it works, otherwise it breaks my build.
An example on what is going on can be found on this repository: https://github.com/PlayMa256/typescript-babel-error