Description
Hello everyone!
I'm not quite sure that this is really a bug or if I am missing a simple configuration option but I googled for 1.5 hours and came up with nothing:
TypeScript Version: 3.0.0-dev.20180619
Search Terms: Stale error, watch mode, saved file, closed file
Code
File a.ts:
import test from './b';
test(4, 5);
File b.ts:
function test(x: number, y: number) {
return x + y / 5;
}
export
6657
default test;
tsconfig.json:
{
"compilerOptions": {
"module": "commonjs",
"noEmit": true,
"strict": true,
"watch": true
}
}
Expected behavior:
When running tsc
on console, everything is fine. When one of the parameter types in b.ts
is changed to string
, the running compiler (in watch mode) should now show an error, becuase test
is called with 2 numbers.
Actual behavior:
Errors only show up when compiler is restarted or when a.ts is saved.
Playground Link: https://github.com/andreasgruenh/typescript-watch
Related Issues: #21325 sounds similar but was fixed according to comments.