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
Most Vue 2 third-party libraries do not provide types for components. Therefore, they cannot profit type checking and intellisense provided by Volar. It may be good to export type DefineComponent just like in Vue 3, so that users can manually shim component types or create PR to add TypeScript support for those Vue2 libraries without changing source code written in Vue <= 2.6.
What does the proposed API look like?
To manually define type of a component in Vue 2.7, we can:
What problem does this feature solve?
Most Vue 2 third-party libraries do not provide types for components. Therefore, they cannot profit type checking and intellisense provided by Volar. It may be good to export type
DefineComponent
just like in Vue 3, so that users can manually shim component types or create PR to add TypeScript support for those Vue2 libraries without changing source code written in Vue <= 2.6.What does the proposed API look like?
To manually define type of a component in Vue 2.7, we can:
The text was updated successfully, but these errors were encountered: