-
-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Improve Access to Component Types (such as props) for TypeScript in Vuetify 3 #18047
Comments
hey, can I work on this? please |
Duplicate of #16680 |
@KaelWD The issue this was marked a duplicate of was closed by the OP. I don't think it's actually resolved. Anyways, I'm just letting you know so this request doesn't get forgotten. |
@KaelWD Can you please reopen this issue? |
import { VSelect } from 'vuetify/components';
type VSelectProps = VSelect['$props'];
interface Props extends /* @vue-ignore */ VSelectProps {}
const props = defineProps<Props>(); Now I am using this method. If there is no
|
The same problem. I wanted to extend vuetify component using wrapper and cannot access vuetify types because of an error // tried different ways
import type { GlobalComponents } from 'vue';
import type { VTextField } from 'vuetify/components';
type IVTextField = InstanceType<typeof VTextField>; The error:
InstanceType highlighted |
Problem to solve
I've often found myself struggling to extend Vuetify components in Vuetify 3. This is because I can't make my component wrappers know what props they can pass down to Vuetify Components themselves. Let's say that I want to make a component wrapper for VCard, how would I be able to ensure that my component wrapper has the same prop list signature as what VCard provides? What about slots? What about events? Where and how can I import that information and apply it to my own wrapper?
Proposed solution
See:
The text was updated successfully, but these errors were encountered: