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

Give an error on using '--module' with a non-module input file #9082

Closed
DanielRosenwasser opened this issue Jun 10, 2016 · 1 comment
Closed
Labels
Breaking Change Would introduce errors in existing code In Discussion Not yet reached consensus Suggestion An idea for TypeScript

Comments

@DanielRosenwasser
Copy link
Member

Currently, if a user doesn't have an import/export statement, output usually messed up and users are left wondering how to fix them. We should give an error on using '--module' with a non-module input file.

Then give users an option like --allowScriptInputs or --allowGlobalInputs if they really know what they're doing.

One thing to keep in mind is that you don't want to create errors in the file itself, as it would be incredibly annoying to constantly see this error while typing. I would think you would only see it at emit time.

@DanielRosenwasser DanielRosenwasser added Suggestion An idea for TypeScript Breaking Change Would introduce errors in existing code labels Jun 10, 2016
@mhegazy mhegazy added the In Discussion Not yet reached consensus label Jun 15, 2016
@RyanCavanaugh
Copy link
Member

This is --isolatedModules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Change Would introduce errors in existing code In Discussion Not yet reached consensus Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants