microsoft / microsoft/TypeScript
Add a mode to tsc that defers to a possibly-running tsc "watch mode" instance
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests; start by locating the tsc watch-mode entry point and the normal build path used by npm test. Determine how a command could communicate with a running watch instance while retaining a fresh-build fallback, then verify both running-watch and no-watch behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, cli, compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100