Visual Studio Code utilizes an internal instance of the typescript compiler to provide error feedback within the editor. Users have the flexibility to select which version of TypeScript to use by adjusting the typescript.tsdk
setting.
I am currently facing a situation where I am receiving red underlines indicating an error that does not occur when using webpack with ts-loader
. Additionally, there is no warning displayed during the webpack build process.
It seems that there are discrepancies in the builds, and I am curious to understand how this can happen.
The specific error I am encountering relates to a TypeScript regression in a newer version that appears across various projects. The error message reads as follows:
Expression produces a union type that is too complex to represent. ts(2590)
This discussion does not focus on addressing the aforementioned error, but rather on the reason behind the disagreement between the in-editor TypeScript and the ts-loader
-loaded TypeScript, despite being from the same version.