-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Allow isolatedModules: true
with noEmitOnError: true
#31012
Labels
Milestone
Comments
RyanCavanaugh
added
Experience Enhancement
Noncontroversial enhancements
Suggestion
An idea for TypeScript
labels
Apr 18, 2019
I think this restriction was added during the period of time in which we were confused about |
mheiber
added a commit
to mheiber/TypeScript
that referenced
this issue
Apr 19, 2019
fix microsoft#31012 Since the purpose of isolatedModules: true is to do extra validation to ensure that separate compilation is safe Allowing emit in the presence of errors is compatible with that intention.
mheiber
added a commit
to mheiber/TypeScript
that referenced
this issue
Apr 19, 2019
fix microsoft#31012 Since the purpose of isolatedModules: true is to do extra validation to ensure that separate compilation is safe Allowing emit in the presence of errors is compatible with that intention.
mheiber
added a commit
to mheiber/TypeScript
that referenced
this issue
Apr 19, 2019
fix microsoft#31012 Since the purpose of isolatedModules: true is to do extra validation to ensure that separate compilation is safe Allowing emit in the presence of errors is compatible with that intention. Signed-off-by: Max Heiber <max.heiber@gmail.com>
mheiber
added a commit
to mheiber/TypeScript
that referenced
this issue
Apr 19, 2019
fix microsoft#31012 Since the purpose of isolatedModules: true is to do extra validation to ensure that separate compilation is safe Allowing emit in the presence of errors is compatible with that intention. Signed-off-by: Max Heiber <max.heiber@gmail.com>
Thanks Ryan! Opening a PR for this change |
mheiber
added a commit
to bloomberg/TypeScript
that referenced
this issue
Apr 20, 2019
fix microsoft#31012 Since the purpose of isolatedModules: true is to do extra validation to ensure that separate compilation is safe Allowing emit in the presence of errors is compatible with that intention. Signed-off-by: Max Heiber <max.heiber@gmail.com>
3 tasks
RyanCavanaugh
pushed a commit
that referenced
this issue
Apr 25, 2019
fix #31012 Since the purpose of isolatedModules: true is to do extra validation to ensure that separate compilation is safe Allowing emit in the presence of errors is compatible with that intention. Signed-off-by: Max Heiber <max.heiber@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Search Terms
Suggestion
Allow isolatedModules: true with noEmitOnError: true
Use Cases
What do you want to use this for?
My understanding of the purpose of
isolatedModules: true
is that it does extra validation to ensure that separate compilation is safe. We want to use it for that purpose.Allowing emit in the presence of errors is contrary to that goal. We're doing the validation to stop dangerous code from getting through.
What shortcomings exist with current approaches?
We use TypeScript in our compilation pipeline.
The only workaround I can think of is some hack to compile to a different location and copy files over once checks pass. This doesn't seem great for watch mode, and could be error-prone or racy.
Examples
tsconfig.json:
Actual behavior:
tsconfig.json(5,9): error TS5053: Option 'noEmitOnError' cannot be specified with option 'isolatedModules'.
Expected behavior: no error message, just works
Checklist
My suggestion meets these guidelines:
The text was updated successfully, but these errors were encountered: