Type-checking broken with TypeScript 4.5.x+
See original GitHub issue- I have searched through existing issues
- I have read through docs
- I have read FAQ
- I have tried restarting VS Code or running
Vetur: Restart VLS
Info
- Platform: macOS
- Vetur version: v0.35.0
- VS Code version: 1.63.2
Problem
When using workspace dependencies with typescript
version 4.5.2 or higher, type checking doesn’t work correctly in the template or script block.
Reproducible Case
- Clone https://github.com/rchl/vetur-ts45
- Set
vetur.useWorkspaceDependencies
in VSCode’s User preferences (it’s not available inWorkspace
preferences). - Open the project and the
src/Test.vue
file.
The issue exists since typescript
v4.5.2. Downgrading to typescript
v4.4.4 works as expected.
There are no public (stable) versions of typescript
in between those.
Result:
Expected
Issue Analytics
- State:
- Created 2 years ago
- Reactions:16
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Documentation - TypeScript 4.5
TypeScript 4.5 supports an ECMAScript proposal for import assertions. This is a syntax used by runtimes to make sure that an import has...
Read more >Documentation - Type Checking JavaScript Files - TypeScript
Here are some notable differences on how checking works in .js files compared to .ts files. Properties are inferred from assignments in class...
Read more >Documentation - TypeScript 4.4
Instead of having to convince TypeScript of a variable's type whenever we use it, the type-checker leverages something called control flow analysis to...
Read more >Documentation - TypeScript 4.7
Around TypeScript 4.5 we rolled out nightly-only support for ESM in Node.js ... By default, TypeScript overlays the same rules with import conditions...
Read more >Documentation - The Basics - TypeScript
If we break this down, the first runnable line of code accesses a property ... the way that our JavaScript runtime chooses what...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Issue is also present with Typescript 4.5.5.
For searchability:
Same here