Closed
Description
TypeScript Version: 3.4.0-dev.20190215
Search Terms: tsc --watch writing to disk too often
TypeScript is writing all files to disk regardless if the contents of those files have changed or not. This is fine on startup, but when using --watch
it still behaves this way even when only one file changes. This causes two problems:
- It's very slow when working with a large number of files
- It triggers too many file change updates for tools like
nodemon
To Reproduce:
First create some files:
$ tsc --version
Version 3.3.1
$ tsc --init
$ echo '//a' > example.ts
$ echo 'require("http").createServer(()=>{}).listen(5050)' > server.js
$ tsc --watch
Then run nodemon server.js
, then re-save example.ts
with no changes.
Expected behavior:
Only files that have changed should write to disk.
Actual behavior:
All files write to disk.