Skip to content
masterclass Buddy

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): () => any

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • InstanceType
  • setup()
  • h()
  • JSX
  • PropType

Source: Global API: General | Vue.js. Checked 2026-11-03.