Closed as not planned
Description
π Search Terms
watch, excess, files, directories
π Version & Regression Information
- This changed between versions 5.0.4 and 5.1.3, still present in typescript@next
β― Playground Link
No response
π» Code
Steps:
npm install -g pnpm
pnpm -r install
pnpm -r build
cd b/2/b-impl/b
./node_modules/.bin/tsc --watch --extendedDiagnostics
Once the build finishes, create a file tmp.txt
in a/2/logs
and observe that TypeScript acts on the file change.
π Actual behavior
If a folder is added to TypeScript's list of "failed lookup locations", any file change at any level within said folder will trigger a rebuild, even if the change is in a nested folder that was not probed during module resolution.
π Expected behavior
TypeScript only watches contents of directories that contain files that were referenced in a tsconfig or probed during module resolution.
Additional information about the issue
Environment: GitHub Codespaces
OS: #19~22.04.1-Ubuntu SMP Wed Jan 10 22:57:03 UTC 2024
node 18.20.2