package @vue/runtime-core
Interfaces
| Name | Summary | 
|---|---|
| Default allowed non-declared props on component in TSX | |
| Interface for declaring custom options. | |
| Custom properties added to component instances in any way and can be accessed through  | |
| For extending allowed non-declared props on components in TSX | |
| We expose a subset of properties on the internal instance as they are useful for advanced external libraries and tools. | |
| Subset of compiler options that makes sense for the runtime. | |
Functions
callWithAsyncErrorHandling(fn, instance, type, args)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function callWithAsyncErrorHandling(fn: Function | Function[], instance: ComponentInternalInstance | null, type: ErrorTypes, args?: unknown[]): any[];callWithErrorHandling(fn, instance, type, args)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function callWithErrorHandling(fn: Function, instance: ComponentInternalInstance | null, type: ErrorTypes, args?: unknown[]): any;createBlock(type, props, children, patchFlag, dynamicProps)
Create a block root vnode. Takes the same exact arguments as createVNode. A block root keeps track of dynamic nodes within the block in the dynamicChildren array.
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
export declare function createBlock(type: VNodeTypes | ClassComponent, props?: Record<string, any> | null, children?: any, patchFlag?: number, dynamicProps?: string[]): VNode;createCommentVNode(text, asBlock)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
export declare function createCommentVNode(text?: string, asBlock?: boolean): VNode;createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function createElementBlock(type: string | typeof Fragment, props?: Record<string, any> | null, children?: any, patchFlag?: number, dynamicProps?: string[], shapeFlag?: number): VNode<RendererNode, RendererElement, {
    [key: string]: any;
}>;createElementVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, needFullChildrenNormalization)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | typeof NULL_DYNAMIC_COMPONENT | 
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
declare function createBaseVNode(type: VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT, props?: (Data & VNodeProps) | null, children?: unknown, patchFlag?: number, dynamicProps?: string[] | null, shapeFlag?: number | ShapeFlags, isBlockNode?: boolean, needFullChildrenNormalization?: boolean): VNode<RendererNode, RendererElement, {
    [key: string]: any;
}>;createHydrationRenderer(options)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
export declare function createHydrationRenderer(options: RendererOptions<Node, Element>): HydrationRenderer;createRenderer(options)
The createRenderer function accepts two generic arguments: HostNode and HostElement, corresponding to Node and Element types in the host environment. For example, for runtime-dom, HostNode would be the DOM Node interface and HostElement would be the DOM Element interface.
Custom renderers can pass in the platform specific types like this:
const { render, createApp } = createRenderer<Node, Element>({
  patchProp,
  ...nodeOps
})| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function createRenderer<HostNode = RendererNode, HostElement = RendererElement>(options: RendererOptions<HostNode, HostElement>): Renderer<HostElement>;createSlots(slots, dynamicSlots)
Compiler runtime helper for creating dynamic slots object
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | ~CompiledSlotDescriptor[] | 
| undefined)[] | Returns | 
export declare function createSlots(slots: Record<string, Slot>, dynamicSlots: (CompiledSlotDescriptor | CompiledSlotDescriptor[] | undefined)[]): Record<string, Slot>;createStaticVNode(content, numberOfNodes)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
export declare function createStaticVNode(content: string, numberOfNodes: number): VNode;createTextVNode(text, flag)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
export declare function createTextVNode(text?: string, flag?: number): VNode;defineAsyncComponent(source)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function defineAsyncComponent<T extends Component = {
    new (): ComponentPublicInstance;
}>(source: AsyncComponentLoader<T> | AsyncComponentOptions<T>): T;defineComponent(setup)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function defineComponent<Props, RawBindings = object>(setup: (props: Readonly<Props>, ctx: SetupContext) => RawBindings | RenderFunction): DefineComponent<Props, RawBindings>;defineComponent(options)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function defineComponent<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string>(options: ComponentOptionsWithoutProps<Props, RawBindings, D, C, M, Mixin, Extends, E, EE>): DefineComponent<Props, RawBindings, D, C, M, Mixin, Extends, E, EE>;defineComponent(options)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function defineComponent<PropNames extends string, RawBindings, D, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = Record<string, any>, EE extends string = string>(options: ComponentOptionsWithArrayProps<PropNames, RawBindings, D, C, M, Mixin, Extends, E, EE>): DefineComponent<Readonly<{
    [key in PropNames]?: any;
}>, RawBindings, D, C, M, Mixin, Extends, E, EE>;defineComponent(options)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function defineComponent<PropsOptions extends Readonly<ComponentPropsOptions>, RawBindings, D, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = Record<string, any>, EE extends string = string>(options: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE>): DefineComponent<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE>;defineEmits(emitOptions)
Vue <script setup> compiler macro for declaring a component’s emitted events. The expected argument is the same as the component emits option.
Example runtime declaration:
const emit = defineEmits(['change', 'update'])Example type-based declaration:
const emit = defineEmits<{
  (event: 'change'): void
  (event: 'update', id: number): void
}>()
emit('change')
emit('update', 1)This is only usable inside <script setup>, is compiled away in the output and should *\*not\*\* be actually called at runtime.
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function defineEmits<EE extends string = string>(emitOptions: EE[]): EmitFn<EE[]>;defineEmits(emitOptions)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function defineEmits<E extends EmitsOptions = EmitsOptions>(emitOptions: E): EmitFn<E>;defineExpose(exposed)
Vue <script setup> compiler macro for declaring a component’s exposed instance properties when it is accessed by a parent component via template refs.
<script setup> components are closed by default - i.e. varaibles inside the <script setup> scope is not exposed to parent unless explicitly exposed via defineExpose.
This is only usable inside <script setup>, is compiled away in the output and should *\*not\*\* be actually called at runtime.
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function defineExpose(exposed?: Record<string, any>): void;defineProps(props)
Vue <script setup> compiler macro for declaring component props. The expected argument is the same as the component props option.
Example runtime declaration:
// using Array syntax
const props = defineProps(['foo', 'bar'])
// using Object syntax
const props = defineProps({
  foo: String,
  bar: {
    type: Number,
    required: true
  }
})Equivalent type-based declaration:
// will be compiled into equivalent runtime declarations
const props = defineProps<{
  foo?: string
  bar: number
}>()This is only usable inside <script setup>, is compiled away in the output and should *\*not\*\* be actually called at runtime.
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function defineProps<PropNames extends string = string>(props: PropNames[]): Readonly<{
    [key in PropNames]?: any;
}>;defineProps(props)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function defineProps<PP extends ComponentObjectPropsOptions = ComponentObjectPropsOptions>(props: PP): Readonly<ExtractPropTypes<PP>>;guardReactiveProps(props)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function guardReactiveProps(props: (Data & VNodeProps) | null): (Data & VNodeProps) | null;h(type, children)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
export declare function h(type: string, children?: RawChildren): VNode;h(type, props, children)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | ({} extends P ? null : never) | 
| 
 | 
 | |
| RawSlots | Returns | 
export declare function h<P, E extends EmitsOptions = {}>(type: FunctionalComponent<P, E>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode;h(type, children)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
export declare function h(type: Component, children?: RawChildren): VNode;h(type, children)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
export declare function h<P>(type: ConcreteComponent | string, children?: RawChildren): VNode;h(type, props, children)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | ({} extends P ? null : never) | 
| 
 | 
 | |
| Returns | 
export declare function h<P>(type: ConcreteComponent<P> | string, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren): VNode;h(type, props, children)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | RawSlots | 
| Returns | 
export declare function h(type: Component, props: null, children?: RawChildren | RawSlots): VNode;h(type, props, children)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | ({} extends P ? null : never) | 
| 
 | 
 | |
| RawSlots | Returns | 
export declare function h<P>(type: ComponentOptions<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode;h(type, children)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
export declare function h(type: Constructor, children?: RawChildren): VNode;h(type, props, children)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | ({} extends P ? null : never) | 
| 
 | 
 | |
| RawSlots | Returns | 
export declare function h<P>(type: Constructor<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode;h(type, children)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
export declare function h(type: DefineComponent, children?: RawChildren): VNode;h(type, props, children)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | ({} extends P ? null : never) | 
| 
 | 
 | |
| RawSlots | Returns | 
export declare function h<P>(type: DefineComponent<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode;h(type, props, children)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | null | 
| 
 | 
 | |
| RawSlots | Returns | 
export declare function h(type: string, props?: RawProps | null, children?: RawChildren | RawSlots): VNode;h(type, children)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | boolean | 
| Returns | 
export declare function h(type: typeof Text | typeof Comment, children?: string | number | boolean): VNode;h(type, props, children)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | boolean | 
| Returns | 
export declare function h(type: typeof Text | typeof Comment, props?: null, children?: string | number | boolean): VNode;h(type, children)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
export declare function h(type: typeof Fragment, children?: VNodeArrayChildren): VNode;h(type, props, children)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | null | 
| 
 | 
 | |
| Returns | 
export declare function h(type: typeof Fragment, props?: RawProps | null, children?: VNodeArrayChildren): VNode;h(type, props, children)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
export declare function h(type: typeof Teleport, props: RawProps & TeleportProps, children: RawChildren): VNode;h(type, children)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
export declare function h(type: typeof Suspense, children?: RawChildren): VNode;h(type, props, children)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | null | 
| 
 | 
 | |
| RawSlots | Returns | 
export declare function h(type: typeof Suspense, props?: (RawProps & SuspenseProps) | null, children?: RawChildren | RawSlots): VNode;handleError(err, instance, type, throwInDev)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function handleError(err: unknown, instance: ComponentInternalInstance | null, type: ErrorTypes, throwInDev?: boolean): void;inject(key)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function inject<T>(key: InjectionKey<T> | string): T | undefined;inject(key, defaultValue, treatDefaultAsFactory)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T, treatDefaultAsFactory?: false): T;inject(key, defaultValue, treatDefaultAsFactory)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T | (() => T), treatDefaultAsFactory: true): T;isMemoSame(cached, memo)
| Name | Type | Description | 
|---|---|---|
| 
 | ||
| 
 | 
 | |
| Returns | 
 | 
export declare function isMemoSame(cached: VNode, memo: any[]): boolean;isVNode(value)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function isVNode(value: any): value is VNode;mergeProps(args)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function mergeProps(...args: (Data & VNodeProps)[]): Data;nextTick(this, fn)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function nextTick<T = void>(this: T, fn?: (this: T) => void): Promise<void>;onActivated(hook, target)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function onActivated(hook: Function, target?: ComponentInternalInstance | null): void;onDeactivated(hook, target)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function onDeactivated(hook: Function, target?: ComponentInternalInstance | null): void;onErrorCaptured(hook, target)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function onErrorCaptured<TError = Error>(hook: ErrorCapturedHook<TError>, target?: ComponentInternalInstance | null): void;openBlock(disableTracking)
Open a block. This must be called before createBlock. It cannot be part of createBlock because the children of the block are evaluated before createBlock itself is called. The generated code typically looks like this:
function render() {
  return (openBlock(),createBlock('div', null, [...]))
}disableTracking is true when creating a v-for fragment block, since a v-for fragment always diffs its children.
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function openBlock(disableTracking?: boolean): void;popScopeId()
Technically we no longer need this after 3.0.8 but we need to keep the same API for backwards compat w/ code generated by compilers.
export declare function popScopeId(): void;provide(key, value)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | number | 
| 
 | 
 | |
| Returns | 
 | 
export declare function provide<T>(key: InjectionKey<T> | string | number, value: T): void;pushScopeId(id)
Set scope id when creating hoisted vnodes. compiler helper
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function pushScopeId(id: string | null): void;queuePostFlushCb(cb)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function queuePostFlushCb(cb: SchedulerJobs): void;registerRuntimeCompiler(_compile)
For runtime-dom to register the compiler. Note the exported method uses any to avoid d.ts relying on the compiler types.
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function registerRuntimeCompiler(_compile: any): void;renderList(source, renderItem)
v-for string
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function renderList(source: string, renderItem: (value: string, index: number) => VNodeChild): VNodeChild[];renderList(source, renderItem)
v-for number
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function renderList(source: number, renderItem: (value: number, index: number) => VNodeChild): VNodeChild[];renderList(source, renderItem)
v-for array
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function renderList<T>(source: T[], renderItem: (value: T, index: number) => VNodeChild): VNodeChild[];renderList(source, renderItem)
v-for iterable
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function renderList<T>(source: Iterable<T>, renderItem: (value: T, index: number) => VNodeChild): VNodeChild[];renderList(source, renderItem)
v-for object
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function renderList<T>(source: T, renderItem: <K extends keyof T>(value: T[K], key: K, index: number) => VNodeChild): VNodeChild[];renderSlot(slots, name, props, fallback, noSlotted)
Compiler runtime helper for rendering <slot/>
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
export declare function renderSlot(slots: Slots, name: string, props?: Data, fallback?: () => VNodeArrayChildren, noSlotted?: boolean): VNode;resolveComponent(name, maybeSelfReference)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function resolveComponent(name: string, maybeSelfReference?: boolean): ConcreteComponent | string;resolveDirective(name)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function resolveDirective(name: string): Directive | undefined;resolveDynamicComponent(component)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function resolveDynamicComponent(component: unknown): VNodeTypes;resolveTransitionHooks(vnode, props, state, instance)
| Name | Type | Description | 
|---|---|---|
| 
 | ||
| 
 | 
 | |
| 
 | ||
| 
 | ||
| Returns | 
export declare function resolveTransitionHooks(vnode: VNode, props: BaseTransitionProps<any>, state: TransitionState, instance: ComponentInternalInstance): TransitionHooks;setBlockTracking(value)
Block tracking sometimes needs to be disabled, for example during the creation of a tree that needs to be cached by v-once. The compiler generates code like this:
_cache[1] || (
  setBlockTracking(-1),
  _cache[1] = createVNode(...),
  setBlockTracking(1),
  _cache[1]
)| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function setBlockTracking(value: number): void;setDevtoolsHook(hook)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function setDevtoolsHook(hook: DevtoolsHook): void;setTransitionHooks(vnode, hooks)
| Name | Type | Description | 
|---|---|---|
| 
 | ||
| 
 | ||
| Returns | 
 | 
export declare function setTransitionHooks(vnode: VNode, hooks: TransitionHooks): void;toHandlers(obj)
For prefixing keys in v-on="obj" with "on"
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function toHandlers(obj: Record<string, any>): Record<string, any>;transformVNodeArgs(transformer)
Internal API for registering an arguments transform for createVNode used for creating stubs in the test-utils It is *internal\* but needs to be exposed for test-utils to pick up proper typings
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| Returns | 
 | 
export declare function transformVNodeArgs(transformer?: typeof vnodeArgsTransformer): void;warn(msg, args)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function warn(msg: string, ...args: any[]): void;watch(sources, cb, options)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function watch<T extends MultiWatchSources, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;watch(source, cb, options)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function watch<T extends Readonly<MultiWatchSources>, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;watch(source, cb, options)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function watch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchOptions<Immediate>): WatchStopHandle;watch(source, cb, options)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function watch<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchOptions<Immediate>): WatchStopHandle;watchEffect(effect, options)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | ||
| Returns | 
 | 
export declare function watchEffect(effect: WatchEffect, options?: WatchOptionsBase): WatchStopHandle;watchPostEffect(effect, options)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function watchPostEffect(effect: WatchEffect, options?: DebuggerOptions): WatchStopHandle;watchSyncEffect(effect, options)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function watchSyncEffect(effect: WatchEffect, options?: DebuggerOptions): WatchStopHandle;withCtx(fn, ctx, isNonScopedSlot)
Wrap a slot function to memoize current rendering instance compiler helper
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function withCtx(fn: Function, ctx?: ComponentInternalInstance | null, isNonScopedSlot?: boolean): Function;withDefaults(props, defaults)
Vue <script setup> compiler macro for providing props default values when using type-based defineProps declaration.
Example usage:
withDefaults(defineProps<{
  size?: number
  labels?: string[]
}>(), {
  size: 3,
  labels: () => ['default label']
})This is only usable inside <script setup>, is compiled away in the output and should *\*not\*\* be actually called at runtime.
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function withDefaults<Props, Defaults extends InferDefaults<Props>>(props: Props, defaults: Defaults): PropsWithDefaults<Props, Defaults>;withDirectives(vnode, directives)
Adds directives to a VNode.
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function withDirectives<T extends VNode>(vnode: T, directives: DirectiveArguments): T;withMemo(memo, render, cache, index)
| Name | Type | Description | 
|---|---|---|
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| 
 | 
 | |
| Returns | 
 | 
export declare function withMemo(memo: any[], render: () => VNode<any, any>, cache: any[], index: number): VNode<any, any, {
    [key: string]: any;
}>;