@vue/runtime-core
Version:
@vue/runtime-core
1,137 lines (961 loc) • 82.3 kB
TypeScript
import { camelize } from '@vue/shared';
import { capitalize } from '@vue/shared';
import { ComponentPropsOptions as ComponentPropsOptions_2 } from '@vue/runtime-core';
import { computed as computed_2 } from '@vue/reactivity';
import { ComputedGetter } from '@vue/reactivity';
import { ComputedRef } from '@vue/reactivity';
import { ComputedSetter } from '@vue/reactivity';
import { customRef } from '@vue/reactivity';
import { CustomRefFactory } from '@vue/reactivity';
import { DebuggerEvent } from '@vue/reactivity';
import { DebuggerEventExtraInfo } from '@vue/reactivity';
import { DebuggerOptions } from '@vue/reactivity';
import { DeepReadonly } from '@vue/reactivity';
import { effect } from '@vue/reactivity';
import { EffectScheduler } from '@vue/reactivity';
import { EffectScope } from '@vue/reactivity';
import { effectScope } from '@vue/reactivity';
import { getCurrentScope } from '@vue/reactivity';
import { IfAny } from '@vue/shared';
import { isProxy } from '@vue/reactivity';
import { isReactive } from '@vue/reactivity';
import { isReadonly } from '@vue/reactivity';
import { isRef } from '@vue/reactivity';
import { isShallow } from '@vue/reactivity';
import { LooseRequired } from '@vue/shared';
import { markRaw } from '@vue/reactivity';
import { normalizeClass } from '@vue/shared';
import { normalizeProps } from '@vue/shared';
import { normalizeStyle } from '@vue/shared';
import { onScopeDispose } from '@vue/reactivity';
import { proxyRefs } from '@vue/reactivity';
import { reactive } from '@vue/reactivity';
import { ReactiveEffect } from '@vue/reactivity';
import { ReactiveEffectOptions } from '@vue/reactivity';
import { ReactiveEffectRunner } from '@vue/reactivity';
import { ReactiveFlags } from '@vue/reactivity';
import { readonly } from '@vue/reactivity';
import { Ref } from '@vue/reactivity';
import { ref } from '@vue/reactivity';
import { ShallowReactive } from '@vue/reactivity';
import { shallowReactive } from '@vue/reactivity';
import { shallowReadonly } from '@vue/reactivity';
import { ShallowRef } from '@vue/reactivity';
import { shallowRef } from '@vue/reactivity';
import { ShallowUnwrapRef } from '@vue/reactivity';
import { ShapeFlags } from '@vue/shared';
import { SlotFlags } from '@vue/shared';
import { stop as stop_2 } from '@vue/reactivity';
import { toDisplayString } from '@vue/shared';
import { toHandlerKey } from '@vue/shared';
import { toRaw } from '@vue/reactivity';
import { ToRef } from '@vue/reactivity';
import { toRef } from '@vue/reactivity';
import { ToRefs } from '@vue/reactivity';
import { toRefs } from '@vue/reactivity';
import { TrackOpTypes } from '@vue/reactivity';
import { TriggerOpTypes } from '@vue/reactivity';
import { triggerRef } from '@vue/reactivity';
import { UnionToIntersection } from '@vue/shared';
import { unref } from '@vue/reactivity';
import { UnwrapNestedRefs } from '@vue/reactivity';
import { UnwrapRef } from '@vue/reactivity';
import { WritableComputedOptions } from '@vue/reactivity';
import { WritableComputedRef } from '@vue/reactivity';
/**
* Default allowed non-declared props on component in TSX
*/
export declare interface AllowedComponentProps {
class?: unknown;
style?: unknown;
}
export declare interface App<HostElement = any> {
version: string;
config: AppConfig;
use(plugin: Plugin_2, ...options: any[]): this;
mixin(mixin: ComponentOptions): this;
component(name: string): Component | undefined;
component(name: string, component: Component): this;
directive(name: string): Directive | undefined;
directive(name: string, directive: Directive): this;
mount(rootContainer: HostElement | string, isHydrate?: boolean, isSVG?: boolean): ComponentPublicInstance;
unmount(): void;
provide<T>(key: InjectionKey<T> | string, value: T): this;
_uid: number;
_component: ConcreteComponent;
_props: Data | null;
_container: HostElement | null;
_context: AppContext;
_instance: ComponentInternalInstance | null;
/**
* v2 compat only
*/
filter?(name: string): Function | undefined;
filter?(name: string, filter: Function): this;
/* Excluded from this release type: _createRoot */
}
export declare interface AppConfig {
readonly isNativeTag?: (tag: string) => boolean;
performance: boolean;
optionMergeStrategies: Record<string, OptionMergeFunction>;
globalProperties: Record<string, any>;
errorHandler?: (err: unknown, instance: ComponentPublicInstance | null, info: string) => void;
warnHandler?: (msg: string, instance: ComponentPublicInstance | null, trace: string) => void;
/**
* Options to pass to `@vue/compiler-dom`.
* Only supported in runtime compiler build.
*/
compilerOptions: RuntimeCompilerOptions;
/**
* @deprecated use config.compilerOptions.isCustomElement
*/
isCustomElement?: (tag: string) => boolean;
/**
* Temporary config for opt-in to unwrap injected refs.
* TODO deprecate in 3.3
*/
unwrapInjectedRef?: boolean;
}
export declare interface AppContext {
app: App;
config: AppConfig;
mixins: ComponentOptions[];
components: Record<string, Component>;
directives: Record<string, Directive>;
provides: Record<string | symbol, any>;
/* Excluded from this release type: optionsCache */
/* Excluded from this release type: propsCache */
/* Excluded from this release type: emitsCache */
/* Excluded from this release type: reload */
/* Excluded from this release type: filters */
}
declare interface AppRecord {
id: number;
app: App;
version: string;
types: Record<string, string | Symbol>;
}
export declare type AsyncComponentLoader<T = any> = () => Promise<AsyncComponentResolveResult<T>>;
export declare interface AsyncComponentOptions<T = any> {
loader: AsyncComponentLoader<T>;
loadingComponent?: Component;
errorComponent?: Component;
delay?: number;
timeout?: number;
suspensible?: boolean;
onError?: (error: Error, retry: () => void, fail: () => void, attempts: number) => any;
}
declare type AsyncComponentResolveResult<T = Component> = T | {
default: T;
};
export declare const BaseTransition: new () => {
$props: BaseTransitionProps<any>;
};
export declare interface BaseTransitionProps<HostElement = RendererElement> {
mode?: 'in-out' | 'out-in' | 'default';
appear?: boolean;
persisted?: boolean;
onBeforeEnter?: Hook<(el: HostElement) => void>;
onEnter?: Hook<(el: HostElement, done: () => void) => void>;
onAfterEnter?: Hook<(el: HostElement) => void>;
onEnterCancelled?: Hook<(el: HostElement) => void>;
onBeforeLeave?: Hook<(el: HostElement) => void>;
onLeave?: Hook<(el: HostElement, done: () => void) => void>;
onAfterLeave?: Hook<(el: HostElement) => void>;
onLeaveCancelled?: Hook<(el: HostElement) => void>;
onBeforeAppear?: Hook<(el: HostElement) => void>;
onAppear?: Hook<(el: HostElement, done: () => void) => void>;
onAfterAppear?: Hook<(el: HostElement) => void>;
onAppearCancelled?: Hook<(el: HostElement) => void>;
}
declare const enum BooleanFlags {
shouldCast = 0,
shouldCastTrue = 1
}
export declare function callWithAsyncErrorHandling(fn: Function | Function[], instance: ComponentInternalInstance | null, type: ErrorTypes, args?: unknown[]): any[];
export declare function callWithErrorHandling(fn: Function, instance: ComponentInternalInstance | null, type: ErrorTypes, args?: unknown[]): any;
export { camelize }
export { capitalize }
/**
* Use this for features with the same syntax but with mutually exclusive
* behavior in 2 vs 3. Only warn if compat is enabled.
* e.g. render function
*/
declare function checkCompatEnabled(key: DeprecationTypes, instance: ComponentInternalInstance | null, ...args: any[]): boolean;
declare interface ClassComponent {
new (...args: any[]): ComponentPublicInstance<any, any, any, any, any>;
__vccOpts: ComponentOptions;
}
export declare function cloneVNode<T, U>(vnode: VNode<T, U>, extraProps?: (Data & VNodeProps) | null, mergeRef?: boolean): VNode<T, U>;
declare const Comment_2: unique symbol;
export { Comment_2 as Comment }
declare type CompatConfig = Partial<Record<DeprecationTypes, boolean | 'suppress-warning'>> & {
MODE?: 2 | 3 | ((comp: Component | null) => 2 | 3);
};
/* Excluded from this release type: compatUtils */
/**
* @deprecated the default `Vue` export has been removed in Vue 3. The type for
* the default export is provided only for migration purposes. Please use
* named imports instead - e.g. `import { createApp } from 'vue'`.
*/
export declare type CompatVue = Pick<App, 'version' | 'component' | 'directive'> & {
configureCompat: typeof configureCompat;
new (options?: ComponentOptions): LegacyPublicInstance;
version: string;
config: AppConfig & LegacyConfig;
nextTick: typeof nextTick;
use(plugin: Plugin_2, ...options: any[]): CompatVue;
mixin(mixin: ComponentOptions): CompatVue;
component(name: string): Component | undefined;
component(name: string, component: Component): CompatVue;
directive(name: string): Directive | undefined;
directive(name: string, directive: Directive): CompatVue;
compile(template: string): RenderFunction;
/**
* @deprecated Vue 3 no longer supports extending constructors.
*/
extend: (options?: ComponentOptions) => CompatVue;
/**
* @deprecated Vue 3 no longer needs set() for adding new properties.
*/
set(target: any, key: string | number | symbol, value: any): void;
/**
* @deprecated Vue 3 no longer needs delete() for property deletions.
*/
delete(target: any, key: string | number | symbol): void;
/**
* @deprecated use `reactive` instead.
*/
observable: typeof reactive;
/**
* @deprecated filters have been removed from Vue 3.
*/
filter(name: string, arg?: any): null;
/* Excluded from this release type: cid */
/* Excluded from this release type: options */
/* Excluded from this release type: util */
/* Excluded from this release type: super */
};
declare interface CompiledSlotDescriptor {
name: string;
fn: Slot;
}
/**
* A type used in public APIs where a component type is expected.
* The constructor type is an artificial type returned by defineComponent().
*/
export declare type Component<Props = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions> = ConcreteComponent<Props, RawBindings, D, C, M> | ComponentPublicInstanceConstructor<Props>;
/**
* Interface for declaring custom options.
*
* @example
* ```ts
* declare module '@vue/runtime-core' {
* interface ComponentCustomOptions {
* beforeRouteUpdate?(
* to: Route,
* from: Route,
* next: () => void
* ): void
* }
* }
* ```
*/
export declare interface ComponentCustomOptions {
}
/**
* Custom properties added to component instances in any way and can be accessed through `this`
*
* @example
* Here is an example of adding a property `$router` to every component instance:
* ```ts
* import { createApp } from 'vue'
* import { Router, createRouter } from 'vue-router'
*
* declare module '@vue/runtime-core' {
* interface ComponentCustomProperties {
* $router: Router
* }
* }
*
* // effectively adding the router to every component instance
* const app = createApp({})
* const router = createRouter()
* app.config.globalProperties.$router = router
*
* const vm = app.mount('#app')
* // we can access the router from the instance
* vm.$router.push('/')
* ```
*/
export declare interface ComponentCustomProperties {
}
/**
* For extending allowed non-declared props on components in TSX
*/
export declare interface ComponentCustomProps {
}
declare type ComponentInjectOptions = string[] | ObjectInjectOptions;
/**
* We expose a subset of properties on the internal instance as they are
* useful for advanced external libraries and tools.
*/
export declare interface ComponentInternalInstance {
uid: number;
type: ConcreteComponent;
parent: ComponentInternalInstance | null;
root: ComponentInternalInstance;
appContext: AppContext;
/**
* Vnode representing this component in its parent's vdom tree
*/
vnode: VNode;
/* Excluded from this release type: next */
/**
* Root vnode of this component's own vdom tree
*/
subTree: VNode;
/**
* Render effect instance
*/
effect: ReactiveEffect;
/**
* Bound effect runner to be passed to schedulers
*/
update: SchedulerJob;
/* Excluded from this release type: render */
/* Excluded from this release type: ssrRender */
/* Excluded from this release type: provides */
/* Excluded from this release type: scope */
/* Excluded from this release type: accessCache */
/* Excluded from this release type: renderCache */
/* Excluded from this release type: components */
/* Excluded from this release type: directives */
/* Excluded from this release type: filters */
/* Excluded from this release type: propsOptions */
/* Excluded from this release type: emitsOptions */
/* Excluded from this release type: inheritAttrs */
/**
* is custom element?
*/
isCE?: boolean;
/**
* custom element specific HMR method
*/
ceReload?: (newStyles?: string[]) => void;
proxy: ComponentPublicInstance | null;
exposed: Record<string, any> | null;
exposeProxy: Record<string, any> | null;
/* Excluded from this release type: withProxy */
/* Excluded from this release type: ctx */
data: Data;
props: Data;
attrs: Data;
slots: InternalSlots;
refs: Data;
emit: EmitFn;
/* Excluded from this release type: emitted */
/* Excluded from this release type: propsDefaults */
/* Excluded from this release type: setupState */
/* Excluded from this release type: devtoolsRawSetupState */
/* Excluded from this release type: setupContext */
/* Excluded from this release type: suspense */
/* Excluded from this release type: suspenseId */
/* Excluded from this release type: asyncDep */
/* Excluded from this release type: asyncResolved */
isMounted: boolean;
isUnmounted: boolean;
isDeactivated: boolean;
/* Excluded from this release type: bc */
/* Excluded from this release type: c */
/* Excluded from this release type: bm */
/* Excluded from this release type: m */
/* Excluded from this release type: bu */
/* Excluded from this release type: u */
/* Excluded from this release type: bum */
/* Excluded from this release type: um */
/* Excluded from this release type: rtc */
/* Excluded from this release type: rtg */
/* Excluded from this release type: a */
/* Excluded from this release type: da */
/* Excluded from this release type: ec */
/* Excluded from this release type: sp */
/**
* For caching bound $forceUpdate on public proxy access
*/
f?: () => void;
/**
* For caching bound $nextTick on public proxy access
*/
n?: () => Promise<void>;
}
declare interface ComponentInternalOptions {
/* Excluded from this release type: __scopeId */
/* Excluded from this release type: __cssModules */
/* Excluded from this release type: __hmrId */
/**
* Compat build only, for bailing out of certain compatibility behavior
*/
__isBuiltIn?: boolean;
/**
* This one should be exposed so that devtools can make use of it
*/
__file?: string;
/**
* name inferred from filename
*/
__name?: string;
}
export declare type ComponentObjectPropsOptions<P = Data> = {
[K in keyof P]: Prop<P[K]> | null;
};
export declare type ComponentOptions<Props = {}, RawBindings = any, D = any, C extends ComputedOptions = any, M extends MethodOptions = any, Mixin extends ComponentOptionsMixin = any, Extends extends ComponentOptionsMixin = any, E extends EmitsOptions = any> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E> & ThisType<CreateComponentPublicInstance<{}, RawBindings, D, C, M, Mixin, Extends, E, Readonly<Props>>>;
export declare interface ComponentOptionsBase<Props, RawBindings, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin, E extends EmitsOptions, EE extends string = string, Defaults = {}> extends LegacyOptions<Props, D, C, M, Mixin, Extends>, ComponentInternalOptions, ComponentCustomOptions {
setup?: (this: void, props: Readonly<LooseRequired<Props & UnionToIntersection<ExtractOptionProp<Mixin>> & UnionToIntersection<ExtractOptionProp<Extends>>>>, ctx: SetupContext<E>) => Promise<RawBindings> | RawBindings | RenderFunction | void;
name?: string;
template?: string | object;
render?: Function;
components?: Record<string, Component>;
directives?: Record<string, Directive>;
inheritAttrs?: boolean;
emits?: (E | EE[]) & ThisType<void>;
expose?: string[];
serverPrefetch?(): Promise<any>;
compilerOptions?: RuntimeCompilerOptions;
/* Excluded from this release type: ssrRender */
/* Excluded from this release type: __ssrInlineRender */
/* Excluded from this release type: __asyncLoader */
/* Excluded from this release type: __asyncResolved */
call?: (this: unknown, ...args: unknown[]) => never;
__isFragment?: never;
__isTeleport?: never;
__isSuspense?: never;
__defaults?: Defaults;
}
export declare type ComponentOptionsMixin = ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>;
export declare type ComponentOptionsWithArrayProps<PropNames extends string = string, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, Props = Readonly<{
[key in PropNames]?: any;
}> & EmitsToProps<E>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, {}> & {
props: PropNames[];
} & ThisType<CreateComponentPublicInstance<Props, RawBindings, D, C, M, Mixin, Extends, E>>;
export declare type ComponentOptionsWithObjectProps<PropsOptions = ComponentObjectPropsOptions, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, Props = Readonly<ExtractPropTypes<PropsOptions>> & EmitsToProps<E>, Defaults = ExtractDefaultPropTypes<PropsOptions>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults> & {
props: PropsOptions & ThisType<void>;
} & ThisType<CreateComponentPublicInstance<Props, RawBindings, D, C, M, Mixin, Extends, E, Props, Defaults, false>>;
export declare type ComponentOptionsWithoutProps<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, PE = Props & EmitsToProps<E>> = ComponentOptionsBase<PE, RawBindings, D, C, M, Mixin, Extends, E, EE, {}> & {
props?: undefined;
} & ThisType<CreateComponentPublicInstance<PE, RawBindings, D, C, M, Mixin, Extends, E>>;
export declare type ComponentPropsOptions<P = Data> = ComponentObjectPropsOptions<P> | string[];
export declare type ComponentProvideOptions = ObjectProvideOptions | Function;
export declare type ComponentPublicInstance<P = {}, // props type extracted from props option
B = {}, // raw bindings returned from setup()
D = {}, // return from data()
C extends ComputedOptions = {}, M extends MethodOptions = {}, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false, Options = ComponentOptionsBase<any, any, any, any, any, any, any, any, any>> = {
$: ComponentInternalInstance;
$data: D;
$props: MakeDefaultsOptional extends true ? Partial<Defaults> & Omit<P & PublicProps, keyof Defaults> : P & PublicProps;
$attrs: Data;
$refs: Data;
$slots: Slots;
$root: ComponentPublicInstance | null;
$parent: ComponentPublicInstance | null;
$emit: EmitFn<E>;
$el: any;
$options: Options & MergedComponentOptionsOverride;
$forceUpdate: () => void;
$nextTick: typeof nextTick;
$watch(source: string | Function, cb: Function, options?: WatchOptions): WatchStopHandle;
} & P & ShallowUnwrapRef<B> & UnwrapNestedRefs<D> & ExtractComputedReturns<C> & M & ComponentCustomProperties;
declare type ComponentPublicInstanceConstructor<T extends ComponentPublicInstance<Props, RawBindings, D, C, M> = ComponentPublicInstance<any>, Props = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions> = {
__isFragment?: never;
__isTeleport?: never;
__isSuspense?: never;
new (...args: any[]): T;
};
declare type ComponentWatchOptionItem = WatchOptionItem | WatchOptionItem[];
declare type ComponentWatchOptions = Record<string, ComponentWatchOptionItem>;
export declare const computed: typeof computed_2;
export { ComputedGetter }
export declare type ComputedOptions = Record<string, ComputedGetter<any> | WritableComputedOptions<any>>;
export { ComputedRef }
export { ComputedSetter }
/**
* Concrete component type matches its actual value: it's either an options
* object, or a function. Use this where the code expects to work with actual
* values, e.g. checking if its a function or not. This is mostly for internal
* implementation code.
*/
export declare type ConcreteComponent<Props = {}, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions> = ComponentOptions<Props, RawBindings, D, C, M> | FunctionalComponent<Props, any>;
declare function configureCompat(config: CompatConfig): void;
declare interface Constructor<P = any> {
__isFragment?: never;
__isTeleport?: never;
__isSuspense?: never;
new (...args: any[]): {
$props: P;
};
}
export declare type CreateAppFunction<HostElement> = (rootComponent: Component, rootProps?: Data | null) => App<HostElement>;
/**
* 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.
*
* @private
*/
export declare function createBlock(type: VNodeTypes | ClassComponent, props?: Record<string, any> | null, children?: any, patchFlag?: number, dynamicProps?: string[]): VNode;
/**
* @private
*/
export declare function createCommentVNode(text?: string, asBlock?: boolean): VNode;
declare function createCompatVue(createApp: CreateAppFunction<Element>, createSingletonApp: CreateAppFunction<Element>): CompatVue;
declare function createComponentInstance(vnode: VNode, parent: ComponentInternalInstance | null, suspense: SuspenseBoundary | null): ComponentInternalInstance;
export declare type CreateComponentPublicInstance<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false, PublicMixin = IntersectionMixin<Mixin> & IntersectionMixin<Extends>, PublicP = UnwrapMixinsType<PublicMixin, 'P'> & EnsureNonVoid<P>, PublicB = UnwrapMixinsType<PublicMixin, 'B'> & EnsureNonVoid<B>, PublicD = UnwrapMixinsType<PublicMixin, 'D'> & EnsureNonVoid<D>, PublicC extends ComputedOptions = UnwrapMixinsType<PublicMixin, 'C'> & EnsureNonVoid<C>, PublicM extends MethodOptions = UnwrapMixinsType<PublicMixin, 'M'> & EnsureNonVoid<M>, PublicDefaults = UnwrapMixinsType<PublicMixin, 'Defaults'> & EnsureNonVoid<Defaults>> = ComponentPublicInstance<PublicP, PublicB, PublicD, PublicC, PublicM, E, PublicProps, PublicDefaults, MakeDefaultsOptional, ComponentOptionsBase<P, B, D, C, M, Mixin, Extends, E, string, Defaults>>;
/**
* @private
*/
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;
}>;
export declare function createElementVNode(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;
}>;
export declare function createHydrationRenderer(options: RendererOptions<Node, Element>): HydrationRenderer;
/* Excluded from this release type: createPropsRestProxy */
declare function createRecord(id: string, initialDef: HMRComponent): boolean;
/**
* 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:
*
* ``` js
* const { render, createApp } = createRenderer<Node, Element>({
* patchProp,
* ...nodeOps
* })
* ```
*/
export declare function createRenderer<HostNode = RendererNode, HostElement = RendererElement>(options: RendererOptions<HostNode, HostElement>): Renderer<HostElement>;
/**
* Compiler runtime helper for creating dynamic slots object
* @private
*/
export declare function createSlots(slots: Record<string, Slot>, dynamicSlots: (CompiledSlotDescriptor | CompiledSlotDescriptor[] | undefined)[]): Record<string, Slot>;
/**
* @private
*/
export declare function createStaticVNode(content: string, numberOfNodes: number): VNode;
declare function createSuspenseBoundary(vnode: VNode, parent: SuspenseBoundary | null, parentComponent: ComponentInternalInstance | null, container: RendererElement, hiddenContainer: RendererElement, anchor: RendererNode | null, isSVG: boolean, slotScopeIds: string[] | null, optimized: boolean, rendererInternals: RendererInternals, isHydrating?: boolean): SuspenseBoundary;
/**
* @private
*/
export declare function createTextVNode(text?: string, flag?: number): VNode;
export declare const createVNode: typeof _createVNode;
declare function _createVNode(type: VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT, props?: (Data & VNodeProps) | null, children?: unknown, patchFlag?: number, dynamicProps?: string[] | null, isBlockNode?: boolean): VNode;
export { customRef }
export { CustomRefFactory }
declare type Data = Record<string, unknown>;
export { DebuggerEvent }
export { DebuggerEventExtraInfo }
declare type DebuggerHook = (e: DebuggerEvent) => void;
export { DebuggerOptions }
export { DeepReadonly }
declare type DefaultFactory<T> = (props: Data) => T | null | undefined;
declare type DefaultKeys<T> = {
[K in keyof T]: T[K] extends {
default: any;
} | BooleanConstructor | {
type: BooleanConstructor;
} ? T[K] extends {
type: BooleanConstructor;
required: true;
} ? never : K : never;
}[keyof T];
export declare function defineAsyncComponent<T extends Component = {
new (): ComponentPublicInstance;
}>(source: AsyncComponentLoader<T> | AsyncComponentOptions<T>): T;
export declare type DefineComponent<PropsOrPropOptions = {}, RawBindings = {}, D = {}, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, PP = PublicProps, Props = Readonly<PropsOrPropOptions extends ComponentPropsOptions ? ExtractPropTypes<PropsOrPropOptions> : PropsOrPropOptions> & ({} extends E ? {} : EmitsToProps<E>), Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>> = ComponentPublicInstanceConstructor<CreateComponentPublicInstance<Props, RawBindings, D, C, M, Mixin, Extends, E, PP & Props, Defaults, true> & Props> & ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults> & PP;
export declare function defineComponent<Props, RawBindings = object>(setup: (props: Readonly<Props>, ctx: SetupContext) => RawBindings | RenderFunction): DefineComponent<Props, RawBindings>;
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>;
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>;
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>;
/**
* 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:
* ```js
* const emit = defineEmits(['change', 'update'])
* ```
*
* Example type-based declaration:
* ```ts
* 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.
*/
export declare function defineEmits<EE extends string = string>(emitOptions: EE[]): EmitFn<EE[]>;
export declare function defineEmits<E extends EmitsOptions = EmitsOptions>(emitOptions: E): EmitFn<E>;
export declare function defineEmits<TypeEmit>(): TypeEmit;
/**
* 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. variables 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.
*/
export declare function defineExpose<Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed): void;
/**
* Vue `<script setup>` compiler macro for declaring component props. The
* expected argument is the same as the component `props` option.
*
* Example runtime declaration:
* ```js
* // 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:
* ```ts
* // 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.
*/
export declare function defineProps<PropNames extends string = string>(props: PropNames[]): Readonly<{
[key in PropNames]?: any;
}>;
export declare function defineProps<PP extends ComponentObjectPropsOptions = ComponentObjectPropsOptions>(props: PP): Readonly<ExtractPropTypes<PP>>;
export declare function defineProps<TypeProps>(): Readonly<TypeProps>;
export declare const enum DeprecationTypes {
GLOBAL_MOUNT = "GLOBAL_MOUNT",
GLOBAL_MOUNT_CONTAINER = "GLOBAL_MOUNT_CONTAINER",
GLOBAL_EXTEND = "GLOBAL_EXTEND",
GLOBAL_PROTOTYPE = "GLOBAL_PROTOTYPE",
GLOBAL_SET = "GLOBAL_SET",
GLOBAL_DELETE = "GLOBAL_DELETE",
GLOBAL_OBSERVABLE = "GLOBAL_OBSERVABLE",
GLOBAL_PRIVATE_UTIL = "GLOBAL_PRIVATE_UTIL",
CONFIG_SILENT = "CONFIG_SILENT",
CONFIG_DEVTOOLS = "CONFIG_DEVTOOLS",
CONFIG_KEY_CODES = "CONFIG_KEY_CODES",
CONFIG_PRODUCTION_TIP = "CONFIG_PRODUCTION_TIP",
CONFIG_IGNORED_ELEMENTS = "CONFIG_IGNORED_ELEMENTS",
CONFIG_WHITESPACE = "CONFIG_WHITESPACE",
CONFIG_OPTION_MERGE_STRATS = "CONFIG_OPTION_MERGE_STRATS",
INSTANCE_SET = "INSTANCE_SET",
INSTANCE_DELETE = "INSTANCE_DELETE",
INSTANCE_DESTROY = "INSTANCE_DESTROY",
INSTANCE_EVENT_EMITTER = "INSTANCE_EVENT_EMITTER",
INSTANCE_EVENT_HOOKS = "INSTANCE_EVENT_HOOKS",
INSTANCE_CHILDREN = "INSTANCE_CHILDREN",
INSTANCE_LISTENERS = "INSTANCE_LISTENERS",
INSTANCE_SCOPED_SLOTS = "INSTANCE_SCOPED_SLOTS",
INSTANCE_ATTRS_CLASS_STYLE = "INSTANCE_ATTRS_CLASS_STYLE",
OPTIONS_DATA_FN = "OPTIONS_DATA_FN",
OPTIONS_DATA_MERGE = "OPTIONS_DATA_MERGE",
OPTIONS_BEFORE_DESTROY = "OPTIONS_BEFORE_DESTROY",
OPTIONS_DESTROYED = "OPTIONS_DESTROYED",
WATCH_ARRAY = "WATCH_ARRAY",
PROPS_DEFAULT_THIS = "PROPS_DEFAULT_THIS",
V_ON_KEYCODE_MODIFIER = "V_ON_KEYCODE_MODIFIER",
CUSTOM_DIR = "CUSTOM_DIR",
ATTR_FALSE_VALUE = "ATTR_FALSE_VALUE",
ATTR_ENUMERATED_COERCION = "ATTR_ENUMERATED_COERCION",
TRANSITION_CLASSES = "TRANSITION_CLASSES",
TRANSITION_GROUP_ROOT = "TRANSITION_GROUP_ROOT",
COMPONENT_ASYNC = "COMPONENT_ASYNC",
COMPONENT_FUNCTIONAL = "COMPONENT_FUNCTIONAL",
COMPONENT_V_MODEL = "COMPONENT_V_MODEL",
RENDER_FUNCTION = "RENDER_FUNCTION",
FILTERS = "FILTERS",
PRIVATE_APIS = "PRIVATE_APIS"
}
export declare let devtools: DevtoolsHook;
declare interface DevtoolsHook {
enabled?: boolean;
emit: (event: string, ...payload: any[]) => void;
on: (event: string, handler: Function) => void;
once: (event: string, handler: Function) => void;
off: (event: string, handler: Function) => void;
appRecords: AppRecord[];
}
export declare type Directive<T = any, V = any> = ObjectDirective<T, V> | FunctionDirective<T, V>;
export declare type DirectiveArguments = Array<[Directive] | [Directive, any] | [Directive, any, string] | [Directive, any, string, DirectiveModifiers]>;
export declare interface DirectiveBinding<V = any> {
instance: ComponentPublicInstance | null;
value: V;
oldValue: V | null;
arg?: string;
modifiers: DirectiveModifiers;
dir: ObjectDirective<any, V>;
}
export declare type DirectiveHook<T = any, Prev = VNode<any, T> | null, V = any> = (el: T, binding: DirectiveBinding<V>, vnode: VNode<any, T>, prevVNode: Prev) => void;
declare type DirectiveModifiers = Record<string, boolean>;
export { effect }
export { EffectScheduler }
export { EffectScope }
export { effectScope }
declare type EmitFn<Options = ObjectEmitsOptions, Event extends keyof Options = keyof Options> = Options extends Array<infer V> ? (event: V, ...args: any[]) => void : {} extends Options ? (event: string, ...args: any[]) => void : UnionToIntersection<{
[key in Event]: Options[key] extends (...args: infer Args) => any ? (event: key, ...args: Args) => void : (event: key, ...args: any[]) => void;
}[Event]>;
export declare type EmitsOptions = ObjectEmitsOptions | string[];
declare type EmitsToProps<T extends EmitsOptions> = T extends string[] ? {
[K in string & `on${Capitalize<T[number]>}`]?: (...args: any[]) => any;
} : T extends ObjectEmitsOptions ? {
[K in string & `on${Capitalize<string & keyof T>}`]?: K extends `on${infer C}` ? T[Uncapitalize<C>] extends null ? (...args: any[]) => any : (...args: T[Uncapitalize<C>] extends (...args: infer P) => any ? P : never) => any : never;
} : {};
declare type EnsureNonVoid<T> = T extends void ? {} : T;
declare type ErrorCapturedHook<TError = unknown> = (err: TError, instance: ComponentPublicInstance | null, info: string) => boolean | void;
export declare const enum ErrorCodes {
SETUP_FUNCTION = 0,
RENDER_FUNCTION = 1,
WATCH_GETTER = 2,
WATCH_CALLBACK = 3,
WATCH_CLEANUP = 4,
NATIVE_EVENT_HANDLER = 5,
COMPONENT_EVENT_HANDLER = 6,
VNODE_HOOK = 7,
DIRECTIVE_HOOK = 8,
TRANSITION_HOOK = 9,
APP_ERROR_HANDLER = 10,
APP_WARN_HANDLER = 11,
FUNCTION_REF = 12,
ASYNC_COMPONENT_LOADER = 13,
SCHEDULER = 14
}
declare type ErrorTypes = LifecycleHooks | ErrorCodes;
declare type ExtractComputedReturns<T extends any> = {
[key in keyof T]: T[key] extends {
get: (...args: any[]) => infer TReturn;
} ? TReturn : T[key] extends (...args: any[]) => infer TReturn ? TReturn : never;
};
export declare type ExtractDefaultPropTypes<O> = O extends object ? {
[K in keyof Pick<O, DefaultKeys<O>>]: InferPropType<O[K]>;
} : {};
declare type ExtractMixin<T> = {
Mixin: MixinToOptionTypes<T>;
}[T extends ComponentOptionsMixin ? 'Mixin' : never];
declare type ExtractOptionProp<T> = T extends ComponentOptionsBase<infer P, // Props
any, // RawBindings
any, // D
any, // C
any, // M
any, // Mixin
any, // Extends
any> ? unknown extends P ? {} : P : {};
export declare type ExtractPropTypes<O> = {
[K in keyof Pick<O, RequiredKeys<O>>]: InferPropType<O[K]>;
} & {
[K in keyof Pick<O, OptionalKeys<O>>]?: InferPropType<O[K]>;
};
export declare const Fragment: {
new (): {
$props: VNodeProps;
};
__isFragment: true;
};
export declare interface FunctionalComponent<P = {}, E extends EmitsOptions = {}> extends ComponentInternalOptions {
(props: P, ctx: Omit<SetupContext<E>, 'expose'>): any;
props?: ComponentPropsOptions<P>;
emits?: E | (keyof E)[];
inheritAttrs?: boolean;
displayName?: string;
compatConfig?: CompatConfig;
}
export declare type FunctionDirective<T = any, V = any> = DirectiveHook<T, any, V>;
export declare const getCurrentInstance: () => ComponentInternalInstance | null;
export { getCurrentScope }
export declare function getTransitionRawChildren(children: VNode[], keepComment?: boolean, parentKey?: VNode['key']): VNode[];
export declare function guardReactiveProps(props: (Data & VNodeProps) | null): (Data & VNodeProps) | null;
export declare function h(type: string, children?: RawChildren): VNode;
export declare function h(type: string, props?: RawProps | null, children?: RawChildren | RawSlots): VNode;
export declare function h(type: typeof Text_2 | typeof Comment_2, children?: string | number | boolean): VNode;
export declare function h(type: typeof Text_2 | typeof Comment_2, props?: null, children?: string | number | boolean): VNode;
export declare function h(type: typeof Fragment, children?: VNodeArrayChildren): VNode;
export declare function h(type: typeof Fragment, props?: RawProps | null, children?: VNodeArrayChildren): VNode;
export declare function h(type: typeof Teleport, props: RawProps & TeleportProps, children: RawChildren): VNode;
export declare function h(type: typeof Suspense, children?: RawChildren): VNode;
export declare function h(type: typeof Suspense, props?: (RawProps & SuspenseProps) | null, children?: RawChildren | RawSlots): VNode;
export declare function h<P, E extends EmitsOptions = {}>(type: FunctionalComponent<P, E>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode;
export declare function h(type: Component, children?: RawChildren): VNode;
export declare function h<P>(type: ConcreteComponent | string, children?: RawChildren): VNode;
export declare function h<P>(type: ConcreteComponent<P> | string, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren): VNode;
export declare function h(type: Component, props: null, children?: RawChildren | RawSlots): VNode;
export declare function h<P>(type: ComponentOptions<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode;
export declare function h(type: Constructor, children?: RawChildren): VNode;
export declare function h<P>(type: Constructor<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode;
export declare function h(type: DefineComponent, children?: RawChildren): VNode;
export declare function h<P>(type: DefineComponent<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode;
export declare function handleError(err: unknown, instance: ComponentInternalInstance | null, type: ErrorTypes, throwInDev?: boolean): void;
declare type HMRComponent = ComponentOptions | ClassComponent;
export declare interface HMRRuntime {
createRecord: typeof createRecord;
rerender: typeof rerender;
reload: typeof reload;
}
declare type Hook<T = () => void> = T | T[];
declare function hydrateSuspense(node: Node, vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, isSVG: boolean, slotScopeIds: string[] | null, optimized: boolean, rendererInternals: RendererInternals, hydrateNode: (node: Node, vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null;
declare function hydrateTeleport(node: Node, vnode: TeleportVNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean, { o: { nextSibling, parentNode, querySelector } }: RendererInternals<Node, Element>, hydrateChildren: (node: Node | null, vnode: VNode, container: Element, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null;
export declare interface HydrationRenderer extends Renderer<Element | ShadowRoot> {
hydrate: RootHydrateFunction;
}
declare type InferDefault<P, T> = T extends null | number | string | boolean | symbol | Function ? T | ((props: P) => T) : (props: P) => T;
declare type InferDefaults<T> = {
[K in keyof T]?: InferDefault<T, NotUndefined<T[K]>>;
};
declare type InferPropType<T> = [T] extends [null] ? any : [T] extends [{
type: null | true;
}] ? any : [T] extends [ObjectConstructor | {
type: ObjectConstructor;
}] ? Record<string, any> : [T] extends [BooleanConstructor | {
type: BooleanConstructor;
}] ? boolean : [T] extends [DateConstructor | {
type: DateConstructor;
}] ? Date : [T] extends [(infer U)[] | {
type: (infer U)[];
}] ? U extends DateConstructor ? Date | InferPropType<U> : InferPropType<U> : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? IfAny<V, V, D> : V : T;
export declare function initCustomFormatter(): void;
export declare function inject<T>(key: InjectionKey<T> | string): T | undefined;
export declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T, treatDefaultAsFactory?: false): T;
export declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T | (() => T), treatDefaultAsFactory: true): T;
export declare interface InjectionKey<T> extends Symbol {
}
/* Excluded from this release type: InternalRenderFunction */
declare type InternalSlots = {
[name: string]: Slot | undefined;
};
declare type IntersectionMixin<T> = IsDefaultMixinComponent<T> extends true ? OptionTypesType<{}, {}, {}, {}, {}> : UnionToIntersection<ExtractMixin<T>>;
declare function isCompatEnabled(key: DeprecationTypes, instance: ComponentInternalInstance | null, enableForBuiltIn?: boolean): boolean;
declare type IsDefaultMixinComponent<T> = T extends ComponentOptionsMixin ? ComponentOptionsMixin extends T ? true : false : false;
export declare function isMemoSame(cached: VNode, memo: any[]): boolean;
export { isProxy }
export { isReactive }
export { isReadonly }
export { isRef }
export declare const isRuntimeOnly: () => boolean;
export { isShallow }
export declare function isVNode(value: any): value is VNode;
export declare const KeepAlive: {
new (): {
$props: VNodeProps & KeepAliveProps;
};
__isKeepAlive: true;
};
export declare interface KeepAliveProps {
include?: MatchPattern;
exclude?: MatchPattern;
max?: number | string;
}
export declare type LegacyConfig = {
/**
* @deprecated `config.silent` option has been removed
*/
silent?: boolean;
/**
* @deprecated use __VUE_PROD_DEVTOOLS__ compile-time feature flag instead
* https://github.com/vuejs/core/tree/main/packages/vue#bundler-build-feature-flags
*/
devtools?: boolean;
/**
* @deprecated use `config.isCustomElement` instead
* https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-ignoredelements-is-now-config-iscustomelement
*/
ignoredElements?: (string | RegExp)[];
/**
* @deprecated
* https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html
*/
keyCodes?: Record<string, number | number[]>;
/**
* @deprecated
* https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-productiontip-removed
*/
productionTip?: boolean;
};
declare interface LegacyOptions<Props, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin> {
compatConfig?: CompatConfig;
[key: string]: any;
data?: (this: CreateComponentPublicInstance<Props, {}, {}, {}, MethodOptions, Mixin, Extends>, vm: CreateComponentPublicInstance<Props, {}, {}, {}, MethodOptions, Mixin, Extends>) => D;
computed?: C;
methods?: M;
watch?: ComponentWatchOptions;
provide?: ComponentProvideOptions;
inject?: ComponentInjectOptions;
filters?: Record<string, Function>;
mixins?: Mixin[];
extends?: Extends;
beforeCreate?(): void;
created?(): void;
beforeMount?(): void;
mounted?(): void;
beforeUpdate?(): void;
updated?(): void;
activated?(): void;
deactivated?(): void;
/** @deprecated use `beforeUnmount` instead */
beforeDestroy?(): void;
beforeUnmount?(): void;
/** @deprecated use `unmounted` instead */
destroyed?(): void;
unmounted?(): void;
renderTracked?: DebuggerHook;
renderTriggered?: DebuggerHook;
errorCaptured?: ErrorCapturedHook;
/**
* runtime compile only
* @deprecated use `compilerOptions.delimiters` instead.
*/
delimiters?: [string, string];
/**
* #3468
*
* type-only, used to assist Mixin's type inference,
* typescript will try to simplify the inferred `Mixin` type,
* with the `__differentiator`, typescript won't be able to combine different mixins,
* because the `__differentiator` will be different
*/
__differentiator?: keyof D | keyof C | keyof M;
}
declare type LegacyPublicInstance = ComponentPublicInstance & LegacyPublicProperties;
declare interface LegacyPublicProperties {
$set(target: object, key: string, value: any): void;
$delete(target: object, key: string): void;
$mount(el?: string | Element): this;
$destroy(): void;
$scopedSlots: Slots;
$on(event: string | string[], fn: Function): this;
$once(event: string, fn: Function): this;
$off(event?: string | string[], fn?: Function): this;
$children: LegacyPublicProperties[];
$listeners: Record<string, Fu