tsc CLI: option to always exit with 0 exit code
See original GitHub issueIt would be nice if the tsc command had an option to always exit with a 0 exit code when there were compile errors. I want to run something in my script after compiling. Currently I have to do this:
set -e
# script stuff
set +e
tsc …
set -e
However this workaround means all errors from tsc
will be silently ignored, not just compile errors.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:11
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Documentation - tsc CLI Options
Flag Type Default
‑‑allowJs boolean false
‑‑allowUmdGlobalAccess boolean false
‑‑allowUnreachableCode boolean
Read more >Keep getting "tsc.exe" exited with code 1
As i was facing same issue and after installing Typescript again got resolved the error, as tsc.exe was missing in (C:\Program Files (x86)\ ......
Read more >ts-node-dev
Compiles your TS app and restarts when files are modified.. Latest version: 2.0.0, last published: 7 months ago. Start using ts-node-dev in ...
Read more >Tasks in Visual Studio Code
Select tsc: build or tsc: watch and VS Code will generate a tasks.json file. ... always revealed and a new terminal is created...
Read more >Yarn run error command failed with exit code 1
Nov 04, 2021 · It would be like the C# compiler returning exit code 0 for code ... If the --check-cache option is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
currently I solve the issue with
tsc || exit 0
Here’s my use case for this feature:
I have a project that is gradually adopting TS and does not have 100% strict compliance yet. So, almost every time we run
tsc
we expect some errors.However, sometimes code gets checked in that breaks
tsc
completely (Call Stack size exceeded, OOM, etc.). I would like to build a CICD job that will ensure thattsc --noEmit
will run without encountering a Fatal Error. This is difficult to do if TSC always exits with an error.