TypeScript Version: 2.7.1
Search Terms:
watch mode, unusedlocals, declared but never read
Code
Run tsc --watch with this:
function one() {}
function two() {
return function three() {
one();
}
}
Then change it to this:
function one() {}
// export added
export function two() {
return function three() {
one();
}
}
Expected behavior:
No errors introduced
Actual behavior:
test.tsx(1,10): error TS6133: 'one' is declared but its value is never read.
17:32:24 - Compilation complete. Watching for file changes.
In a larger project, I saw this just from running tsc --watch, didn't need to make a change to trigger it.
This doesn't show up when running tsc without watch, and no errors show up in VSCode either.
TypeScript Version: 2.7.1
Search Terms:
watch mode, unusedlocals, declared but never read
Code
Run tsc --watch with this:
Then change it to this:
Expected behavior:
No errors introduced
Actual behavior:
In a larger project, I saw this just from running tsc --watch, didn't need to make a change to trigger it.
This doesn't show up when running tsc without watch, and no errors show up in VSCode either.