Using dynamic values results in TypeScript errors inside VS Code
See original GitHub issueDescribe the bug When using a dynamic nested state for validation, TypeScript throws errors inside VS Code.
To Reproduce Steps to reproduce the behavior:
- Setup nuxt project with Typescript
- Create validation with nested state
- See error
Expected behavior No TS error should be thrown
Screenshots
Additional context
Using version
2.0.0-alpha.34
I’m not very experienced with Typescript so chances are that i’m overlooking something, but i can’t find any way to resolve this.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Dynamic type validation in TypeScript - LogRocket Blog
It will check if performing any operation on a variable is possible given its type. Most people think that by using TypeScript as...
Read more >Editor shows error on a valid TypeScript dynamic import ...
I have a second one in the folder with my source files, which extneds the one in the root folder, but for some...
Read more >TypeScript errors and how to fix them
A list of common TypeScript errors and how to fix them.
Read more >TypeScript Programming with Visual Studio Code
The TypeScript language service will analyze your program for coding problems and report errors and warnings: In the Status bar, there is a...
Read more >Chapter 1. Getting familiar with TypeScript - liveBook · Manning
This error is caught by the TypeScript static code analyzer while you type, even before you compile this code with the Typescript compiler...
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 Free
Top 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
@A-Ghorab Ah didn’t know about that one, that does the trick! Thank you so much!
I think this error is normal for this situation because you use a optional variable.I think you can use these ways to solve this problem 👍
if
control