ComponentOptions Type — vue Architecture
Architecture documentation for the ComponentOptions type/interface in options.d.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 411f6adb_d441_acd1_faa7_da473b8c9322["ComponentOptions"] f493510d_f7fc_4153_b4bd_6a9c8da0e741["options.d.ts"] 411f6adb_d441_acd1_faa7_da473b8c9322 -->|defined in| f493510d_f7fc_4153_b4bd_6a9c8da0e741 style 411f6adb_d441_acd1_faa7_da473b8c9322 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
types/options.d.ts lines 168–245
export interface ComponentOptions<
V extends Vue,
Data = DefaultData<V>,
Methods = DefaultMethods<V>,
Computed = DefaultComputed,
PropsDef = PropsDefinition<DefaultProps>,
Props = DefaultProps,
RawBindings = {},
Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,
Extends extends ComponentOptionsMixin = ComponentOptionsMixin
> {
data?: Data
props?: PropsDef
propsData?: object
computed?: Accessors<Computed>
methods?: Methods
watch?: Record<string, WatchOptionsWithHandler<any> | WatchHandler<any> | Array<WatchOptionsWithHandler<any> | WatchHandler<any>>>
setup?: (
this: void,
props: Props,
ctx: SetupContext
) => Promise<RawBindings> | RawBindings | ((h: CreateElement) => VNode) | void
el?: Element | string
template?: string
// hack is for functional component type inference, should not be used in user code
render?(
createElement: CreateElement,
hack: RenderContext<Props>
): VNode | null | void
renderError?(createElement: CreateElement, err: Error): VNode
staticRenderFns?: ((createElement: CreateElement) => VNode)[]
beforeCreate?(this: V): void
created?(): void
beforeDestroy?(): void
destroyed?(): void
beforeMount?(): void
mounted?(): void
beforeUpdate?(): void
updated?(): void
activated?(): void
deactivated?(): void
errorCaptured?(err: Error, vm: Vue, info: string): boolean | void
serverPrefetch?(): Promise<void>
renderTracked?(e: DebuggerEvent): void
renderTriggerd?(e: DebuggerEvent): void
directives?: { [key: string]: DirectiveFunction | DirectiveOptions }
components?: {
[key: string]:
| {}
| Component<any, any, any, any, any>
| AsyncComponent<any, any, any, any>
}
transitions?: { [key: string]: object }
filters?: { [key: string]: Function }
provide?: object | (() => object)
inject?: InjectOptions
model?: {
prop?: string
event?: string
}
parent?: Vue
mixins?: (Mixin | ComponentOptions<Vue> | typeof Vue)[]
name?: string
// for SFC auto name inference w/ ts-loader check
__name?: string
// TODO: support properly inferred 'extends'
extends?: Extends | ComponentOptions<Vue> | typeof Vue
delimiters?: [string, string]
comments?: boolean
inheritAttrs?: boolean
}
Defined In
Source
Frequently Asked Questions
What is the ComponentOptions type?
ComponentOptions is a type/interface in the vue codebase, defined in types/options.d.ts.
Where is ComponentOptions defined?
ComponentOptions is defined in types/options.d.ts at line 168.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free