Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-exporting types is incompatible with --isolatedModules=true #34

Open
hjfreyer opened this issue Jun 12, 2020 · 3 comments
Open

Re-exporting types is incompatible with --isolatedModules=true #34

hjfreyer opened this issue Jun 12, 2020 · 3 comments

Comments

@hjfreyer
Copy link

See this thread about the incompatibility of the two features: https://www.reddit.com/r/typescript/comments/e9span/isolatedmodules_prevents_exporting_a_type_from_a/

It'd be nice to have a flag that simply causes these types to not be re-exported (I'm not totally sure why they are in the first place). Workaround is just to delete the line that re-exports, for example, with sed:

sed -i "/^export [{]/d" $file.validator.ts
@mezeguer
Copy link

Thanks @hjfreyer.

This was an issue for me aswell and your workaround works like a charm.

@devholman
Copy link

I'm using a mac so when running the app locally I needed to do this to run the same command sed -i '' "/^export [{]/d" $file.validator.ts note the '' after the -i flag.

I hope hjfreyer's suggestion is considered at some point.

@ghost
Copy link

ghost commented Jan 19, 2022

Same problem. Thanks for the workaround @hjfreyer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants