Merged
Conversation
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds
noCheck, a compiler option which instructs the compiler to skip the semantic diagnostics phase. This means the compiler skips right form program construction, parsing, and binding, to emit. Implementation-wise, the basically just considers every file the same way we do declaration files underskipLibCheck, or project reference redirects.As-is, there are some limitations on this - declaration emit works wonderfully already - every test with declaration emit on also tests declaration emit with
noCheck, while JS emit needs some functionality disentangled from the checker's full-tree-error-walk to consistently work with this. As such,noCheckrequiresemitDeclarationOnlyfor now. (This limitation could be lifted with some additional work to make a lazy version of the.referencednode links calculations in checker, and by making lazy versions of all the calculations implied by thegetNodeCheckFlagscalls in the JS transforms - which would be required to do #50699 and for this to fulfill #29651) Additionally, passingnoCheckalongsidenoEmitis an error - there's nothing wrong with this combination of options, it just seems like it doesn't do anything.noCheckis not currently exposed on the commandline or to tsconfig files, and is an internal API, as there was some concern at the design meeting that it might need to change a bit when we add support for JS emit to it.