TypeScript errors out of the box
See original GitHub issueI have a Vue project with TypeScript, and just with this code block I’m getting a type error:
Argument of type 'PluginFunction<any>' is not assignable to parameter of type 'PluginObject<any> | PluginFunction<any>'.
import Vue from 'vue';
import Vuelidate from 'vuelidate';
Vue.use(Vuelidate);
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:18
Top Results From Across the Web
TypeScript errors and how to fix them
Below you find a list of common TypeScript errors along with the buggy code and its fixed version. If you're interested in more...
Read more >suddenly typescript errors with tsconfig.json
When I try to debug a C# unittest via context action in the code editor window, the build suddenly fails with a lot...
Read more >How to read TypeScript errors - HipsterBrown
When seeing TypeScript errors for the first time, they can range from helpful to WTF.
Read more >Report typescript errors as warnings in Visual Studio and don't ...
I think msbuild watches the output for the word 'error'. When it does it flags an error. · These errors are identified by...
Read more >Documentation - TypeScript 3.9
That's why TypeScript 3.9 brings a new feature: // @ts-expect-error comments. When a line is preceded by a // @ts-expect-error comment, TypeScript will...
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
I had the same problem with similar tsconfig.json. I used yarn in project. As playgound worked fine and neighter deleting node_modules and reinstalling did not helped I expected some tsconfig issue. After some hours of many changes of tsconfig and googling, I found Jan Esser’s comment about two versions of vue in project (https://github.com/vuelidate/vuelidate/pull/287). Confirmed that this was the case.
Problem was caused by yarn duplicates of vue package in yarn.lock. Helped using yarn-deduplicate to fix duplicates followed by yarn install. It worked correctly now. Thank you Jan for good job.
@mvandak thanks, works fine. After that, close and re open VSC to get the changes.