question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] TypeScript definitions for component methods

See original GitHub issue

Let’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: image

What is the proper way to achieve this? Please let me know, thanks.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:39
  • Comments:17 (5 by maintainers)

github_iconTop GitHub Comments

19reactions
johnleidercommented, Nov 18, 2019

It’s in our eyes for v3.

11reactions
albernhagencommented, Jan 3, 2019

I’d also like to see this implemented.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found