[Feature Request] TypeScript definitions for component methods
See original GitHub issueLet’s say I have a v-form in my template;
<v-form ref="form" v-model="valid" lazy-validation>
If I want to use the functions like validate() and reset() on that form, I need a way to cast the ref to form.
I have added “vuetify” to the types array in my tsconfig, and am able to successfully import { VForm } from ‘vuetify/lib’, but when I try this, I get an error:
What is the proper way to achieve this? Please let me know, thanks.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:39
- Comments:17 (5 by maintainers)
Top Results From Across the Web
Building TypeScript definitions on demand - Leonardo Faria
The solution. I am using the react-to-typescript-definitions package to create definitions from the compiled files. The tool can map most ...
Read more >Documentation - Decorators - TypeScript
A Decorator is a special kind of declaration that can be attached to a class declaration, method, accessor, property, or parameter. Decorators use...
Read more >Documentation - TypeScript 3.8
'Component' only refers to a type, but is being used as a value here. ... For more information about the feature, you can...
Read more >Documentation - Modules - TypeScript
Modules are executed within their own scope, not in the global scope; this means that variables, functions, classes, etc. declared in a module...
Read more >Documentation - Narrowing - TypeScript
Much like how TypeScript analyzes runtime values using static types, it overlays type analysis on JavaScript's runtime control flow constructs like if/else , ......
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
It’s in our eyes for v3.
I’d also like to see this implemented.