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

TypeScript compiler (tsc) adds extra export {}; line. #1

Closed
fabrizzio-gz opened this issue Mar 11, 2021 · 1 comment
Closed

TypeScript compiler (tsc) adds extra export {}; line. #1

fabrizzio-gz opened this issue Mar 11, 2021 · 1 comment

Comments

@fabrizzio-gz
Copy link
Owner

TypeScript recognizes source files as modules because they import types and adds an extra export {}; line that makes files unreadable by web browser. This is the desired behavior of TypeScript compiler at the current version read more.

Current solution: manually delete extra export {}; line on generated .js files.

@fabrizzio-gz
Copy link
Owner Author

Updated files to include types globally by adding a global.d.ts file. Problem solved.

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

1 participant