TypeScript: compilerOptions.types
not respected when using project references
#59466
Labels
typescript
Typescript support issues
Steps to Reproduce:
Full reproduction case
tsconfig.json
that has project references, where the referenced TS projects specify a customcompilerOptions.types
Expected: VSCode should respect
compilerOption.types
.Actual: VSCode appears to ignore
compilerOption.types
.For example, I have three TS projects:
tsconfig-src.json
which should not havejest
types (compilerOption.types
is set to[]
)tsconfig-tests.json
which should havejest
types (compilerOption.types
is set to["jest"]
)tsconfig.json
whichreferences
both of the aboveThe following file is part of the
tsconfig-src.json
project:When I run
tsc -b -f tsconfig.json
, I get the expected error:(
test
is a global type provided by thejest
types.)However, VSCode has no error. Instead, the types appear to be available, even when they shouldn't:
You can try this for yourself with the provided full reproduction case.
The text was updated successfully, but these errors were encountered: