How can I overide a type from a component defintion #11127
Unanswered
fbruzzi-matawan
asked this question in
Help/Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm trying to define a new component type from the type of VTextField component from Vuetify.
Here I want
CustomTextField
to be same type asVTextField
except for the prosrules
that I want to override.I manage to add my new type on Rules using those two syntax but it's merging both types whereas I want to override it
type CustomTextField = typeof VTextField & DefineComponent<{ rules: NewRules }>
type CustomTextField = DefineComponent<VTextField, {}, {}, {}, {}, {}, {}, {}, {}, {rules: NewRules}>
With the code above rules while now be defined as
readonly ValidationRule$1[] & NewRules
whereas I want it to beNewRules
Do you have an idea about how I can handle that?
Beta Was this translation helpful? Give feedback.
All reactions