You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a largish code base in Vue2 and are looking into upgrading it to Vue3. We already use Typescript, but without class components. The way we write components in Vue2 is this:
This has worked well for us so far. In Vue3, extendhas been removed and the way to go is to use defineComponent. However, this function doesn't seem to expose the same generics as Vue.extend did. This makes migration from Vue2 quite costly.
Do you see a way to retrofit defineComponent with an overload that accepts Data, Methods, Computed and Props as Typescript generics?
Uh oh!
There was an error while loading. Please reload this page.
What problem does this feature solve?
We have a largish code base in Vue2 and are looking into upgrading it to Vue3. We already use Typescript, but without class components. The way we write components in Vue2 is this:
This has worked well for us so far. In Vue3,
extend
has been removed and the way to go is to usedefineComponent
. However, this function doesn't seem to expose the same generics asVue.extend
did. This makes migration from Vue2 quite costly.Do you see a way to retrofit
defineComponent
with an overload that accepts Data, Methods, Computed and Props as Typescript generics?Partly related to #3102
What does the proposed API look like?
The text was updated successfully, but these errors were encountered: