microsoft / microsoft/TypeScript
watch additional files
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
Search Terms
tsc watch yarn.lock
Suggestion
add the ability to watch files that are not part of the default set
Use Cases
primary use case for this is to auto restart language server, or a tsc --watch if yarn.lock changes when using pnp since there is no node_modules to watch. currently if a library is removed tsc will actually crash when it goes missing. When a library is added tsc watch needs to be manually restarted.
Examples
I think these should be additive, not replace the existing paths, however I can see adding a new option for additivity, or requiring this to replace existing options. If it replaces the current watch set then it should be well documented how to specify them. If no arguments are provided the behavior of suggested would be use the defaults.
tsc --watch yarn.lock
"compilerOptions": {
"watch": {
"paths": ["yarn.lock"],
},
}
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, 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
Start by examining the tsc --watch entry point and the existing default file-watch handling. The issue proposes command-line and compilerOptions forms but leaves their interaction and additivity unresolved; completion would require a decided interface, implementation, documentation, and coverage for watching yarn.lock changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100