-
Notifications
You must be signed in to change notification settings - Fork 12.8k
No output emitted even for correct files in Project References if one file has error #38537
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
Comments
I'm not sure about this. We currently emit zero files on purpose, since:
Why do you want this to happen? |
This is working as intended. |
For my project, typescript errors are generally not a big deal. Usually red squiggles mean something needs to be casted to the correct type. I want to be able to test my code before I fix all type errors, so I have
Does tsbuildinfo contain the error messages? I think that would allow failing the build even if the project is in the up-to-date state. |
We want to just run the plain JS to see if it works. Sometimes we want to treat type errors as warnings, especially useful when migrating code, or refactoring, so we can at least run and verify the app works too (it's just JS). Sometimes global pollution, etc. Despite type errors, the code may work perfectly fine, and sometimes we want TS to be out of the way so we can show that neat prototype we just made (the person viewing the prototype doesn't need to know there are type errors). Boss: can you show the prototype in the meeting? Not a fun situation... |
#32651 discusses |
TypeScript Version: 3.9.2
Search Terms:
project references emit error force noEmitOnError
Code
tsconfig.json
project1/tsconfig.json
project1/ok.ts
project1/fail.ts
Expected behavior:
When I run
tsc --build --force --verbose
, I expect at leastproject1/ok.js
to be output, because:ok.ts
compiles correctly"noEmitOnError": false
explicitly inproject1/tsconfig.json
--force
flagActual behavior:
Nothing is generated.
Reproduction repo:
https://github.com/dandv/ts-project-ref-bug
The text was updated successfully, but these errors were encountered: