Vue.js · Function
defineComponent
defineComponent() is a Vue type helper. It improves TypeScript inference for components, including props, setup context, and component instances.
Last updated
- Since
- 3.3+ (function signature)
Syntax
function defineComponent(component: ComponentOptions): ComponentConstructor
function defineComponent(setup: ComponentOptions['setup'], extraOptions?: ComponentOptions): () => anyIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
InstanceTypesetup()h()JSXPropType