Answer the question
In order to leave comments, you need to log in
How to correctly create a package with the isolatedModules=true option enabled?
In a file where I export all the classes of my package on lines like the following:
export {default as BoundList, IBoundListOption, TBoundListFilterFn} from './list/BoundList';
TS1205: Cannot re-export a type when the '--isolatedModules' flag is provided.
Answer the question
In order to leave comments, you need to log in
the easiest way to get rid of the error is to name both the interface and the component with the same name
// BoundList.tsx
export interface BoundList {}
export const BoundList = () => null;
// index.tsx
export { BoundList } from './BoundList';
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question