Add a mode to tsc that defers to a possibly-running tsc "watch mode" instance #42838
Open
Description
opened on Feb 17, 2021
Suggestion
Currently my projects have an npm script defined to run tsc --watch
. I also have a test
script configured. When working interactively, I don't want my test
to wait 10s while it builds from scratch, when watch mode was running, and I just need to ask the running instance to let me know when the current generation of the source has been fully processed.
However, if I'm for some reason not running watch mode, like if someone unfamiliar with the project checks out the repo and tries to run npm test
, or a CI system that has no special accommodations, it'd be useful if it went ahead and did a fresh build.
(Watch mode is great, I wish this idea was more commonplace!)
🔍 Search Terms
watch mode, incremental, npm, test
✅ Viability Checklist
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.
Activity