-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Incremental compilation does not catch type errors in deep imports #24986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Milestone
Comments
looks like a duplicate of #25068 |
sheetalkamat
added a commit
that referenced
this issue
Jul 9, 2018
sheetalkamat
added a commit
that referenced
this issue
Jul 10, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems watch mode does not check for type errors induced by changes to types in deep imports.
A restart is required to catch these errors.
TypeScript Version:*
Version 3.0.0-dev.20180609 on Windows 10
Search Terms:
watch, incremental, deep
Code
Three files> a.ts, b.ts and c.ts + empty tsconfig.json file to please tsc.
Expected behavior:
Running tsc --watch and making a type error in a.ts by inducing a change in c.ts should result in a type error in the console.
e.g. changing
to
should result in a type error in a.ts:
a.ts:3:17 - error TS2339: Property 'd' does not exist on type 'C'.
Actual behavior:
Running tsc --watch and making a type error in a.ts by inducing a change in c.ts does not result in a type error. Instead, the compiler happily writes:
Found 0 errors. Watching for file changes.
Restarting tsc in watch mode results in the expected type error:
a.ts:3:17 - error TS2339: Property 'd' does not exist on type 'C'.
The text was updated successfully, but these errors were encountered: