import { camelize } from '@vue/shared'; import { capitalize } from '@vue/shared'; import { ComputedGetter } from '@vue/reactivity'; import { ComputedRef } from '@vue/reactivity'; import { customRef } from '@vue/reactivity'; import { DebuggerEvent } from '@vue/reactivity'; import { DeepReadonly } from '@vue/reactivity'; import { isProxy } from '@vue/reactivity'; import { isReactive } from '@vue/reactivity'; import { isReadonly } from '@vue/reactivity'; import { isRef } from '@vue/reactivity'; import { markRaw } from '@vue/reactivity'; import { proxyRefs } from '@vue/reactivity'; import { reactive } from '@vue/reactivity'; import { ReactiveEffect } from '@vue/reactivity'; import { ReactiveEffectOptions } 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 { shallowReadonly } from '@vue/reactivity'; import { shallowRef } from '@vue/reactivity'; import { ShallowUnwrapRef } from '@vue/reactivity'; import { SlotFlags } from '@vue/shared'; import { toDisplayString } from '@vue/shared'; import { toHandlerKey } from '@vue/shared'; import { toRaw } 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 { unref } 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 { 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): ComponentPublicInstance; unmount(): void; provide(key: InjectionKey | string, value: T): this; _uid: number; _component: ConcreteComponent; _props: Data | null; _container: HostElement | null; _context: AppContext; } export declare interface AppConfig { readonly isNativeTag?: (tag: string) => boolean; performance: boolean; optionMergeStrategies: Record; globalProperties: Record; isCustomElement: (tag: string) => boolean; errorHandler?: (err: unknown, instance: ComponentPublicInstance | null, info: string) => void; warnHandler?: (msg: string, instance: ComponentPublicInstance | null, trace: string) => void; } export declare interface AppContext { app: App; config: AppConfig; mixins: ComponentOptions[]; components: Record; directives: Record; provides: Record; /* Excluded from this release type: deopt */ /* Excluded from this release type: reload */ } declare interface AppRecord { id: number; app: App; version: string; types: Record; } export declare type AsyncComponentLoader = () => Promise>; export declare interface AsyncComponentOptions { loader: AsyncComponentLoader; loadingComponent?: Component; errorComponent?: Component; delay?: number; timeout?: number; suspensible?: boolean; onError?: (error: Error, retry: () => void, fail: () => void, attempts: number) => any; } declare type AsyncComponentResolveResult = T | { default: T; }; export declare const BaseTransition: new () => { $props: BaseTransitionProps; }; export declare interface BaseTransitionProps { mode?: 'in-out' | 'out-in' | 'default'; appear?: boolean; persisted?: boolean; onBeforeEnter?: (el: HostElement) => void; onEnter?: (el: HostElement, done: () => void) => void; onAfterEnter?: (el: HostElement) => void; onEnterCancelled?: (el: HostElement) => void; onBeforeLeave?: (el: HostElement) => void; onLeave?: (el: HostElement, done: () => void) => void; onAfterLeave?: (el: HostElement) => void; onLeaveCancelled?: (el: HostElement) => void; onBeforeAppear?: (el: HostElement) => void; onAppear?: (el: HostElement, done: () => void) => void; onAfterAppear?: (el: HostElement) => void; onAppearCancelled?: (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 } declare interface ClassComponent { new (...args: any[]): ComponentPublicInstance; __vccOpts: ComponentOptions; } export declare function cloneVNode(vnode: VNode, extraProps?: Data & VNodeProps | null, mergeRef?: boolean): VNode; declare const Comment_2: unique symbol; export { Comment_2 as Comment } 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 = ConcreteComponent | ComponentPublicInstanceConstructor; /** * 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[] | Record; /** * 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; /** * The reactive effect for rendering and patching the component. Callable. */ update: ReactiveEffect; /* Excluded from this release type: render */ /* Excluded from this release type: ssrRender */ /* Excluded from this release type: provides */ /* Excluded from this release type: effects */ /* 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: propsOptions */ /* Excluded from this release type: emitsOptions */ proxy: ComponentPublicInstance | null; exposed: Record | 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: 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 */ } declare interface ComponentInternalOptions { /* Excluded from this release type: __props */ /* Excluded from this release type: __emits */ /* Excluded from this release type: __scopeId */ /* Excluded from this release type: __cssModules */ /* Excluded from this release type: __hmrId */ /** * This one should be exposed so that devtools can make use of it */ __file?: string; } export declare type ComponentObjectPropsOptions

= { [K in keyof P]: Prop | null; }; export declare type ComponentOptions = ComponentOptionsBase & ThisType>>; export declare interface ComponentOptionsBase extends LegacyOptions, ComponentInternalOptions, ComponentCustomOptions { setup?: (this: void, props: Props & UnionToIntersection> & UnionToIntersection>, ctx: SetupContext) => Promise | RawBindings | RenderFunction | void; name?: string; template?: string | object; render?: Function; components?: Record; directives?: Record; inheritAttrs?: boolean; emits?: (E | EE[]) & ThisType; expose?: string[]; serverPrefetch?(): Promise; /* Excluded from this release type: ssrRender */ /* Excluded from this release type: __ssrInlineRender */ /* Excluded from this release type: __asyncLoader */ /* Excluded from this release type: __merged */ call?: (this: unknown, ...args: unknown[]) => never; __isFragment?: never; __isTeleport?: never; __isSuspense?: never; __defaults?: Defaults; } export declare type ComponentOptionsMixin = ComponentOptionsBase; export declare type ComponentOptionsWithArrayProps> = ComponentOptionsBase & { props: PropNames[]; } & ThisType>; export declare type ComponentOptionsWithObjectProps>, Defaults = ExtractDefaultPropTypes> = ComponentOptionsBase & { props: PropsOptions & ThisType; } & ThisType>; export declare type ComponentOptionsWithoutProps = ComponentOptionsBase & { props?: undefined; } & ThisType>; export declare type ComponentPropsOptions

= ComponentObjectPropsOptions

| string[]; export declare type ComponentPublicInstance

> = { $: ComponentInternalInstance; $data: D; $props: MakeDefaultsOptional extends true ? Partial & Omit

: P & PublicProps; $attrs: Data; $refs: Data; $slots: Slots; $root: ComponentPublicInstance | null; $parent: ComponentPublicInstance | null; $emit: EmitFn; $el: any; $options: Options; $forceUpdate: ReactiveEffect; $nextTick: typeof nextTick; $watch(source: string | Function, cb: Function, options?: WatchOptions): WatchStopHandle; } & P & ShallowUnwrapRef & D & ExtractComputedReturns & M & ComponentCustomProperties; declare type ComponentPublicInstanceConstructor = ComponentPublicInstance, 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; export declare function computed(getter: ComputedGetter): ComputedRef; export declare function computed(options: WritableComputedOptions): WritableComputedRef; export declare type ComputedOptions = Record | WritableComputedOptions>; export { ComputedRef } /** * 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 = ComponentOptions | FunctionalComponent; declare interface Constructor

{ __isFragment?: never; __isTeleport?: never; __isSuspense?: never; new (...args: any[]): { $props: P; }; } export declare type CreateAppFunction = (rootComponent: Component, rootProps?: Data | null) => App; /** * 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 | null, children?: any, patchFlag?: number, dynamicProps?: string[]): VNode; /** * @private */ export declare function createCommentVNode(text?: string, asBlock?: boolean): VNode; declare function createComponentInstance(vnode: VNode, parent: ComponentInternalInstance | null, suspense: SuspenseBoundary | null): ComponentInternalInstance; declare type CreateComponentPublicInstance

& IntersectionMixin, PublicP = UnwrapMixinsType & EnsureNonVoid

, PublicB = UnwrapMixinsType & EnsureNonVoid, PublicD = UnwrapMixinsType & EnsureNonVoid, PublicC extends ComputedOptions = UnwrapMixinsType & EnsureNonVoid, PublicM extends MethodOptions = UnwrapMixinsType & EnsureNonVoid, PublicDefaults = UnwrapMixinsType & EnsureNonVoid> = ComponentPublicInstance>; export declare function createHydrationRenderer(options: RendererOptions): HydrationRenderer; declare function createRecord(id: string, component: ComponentOptions | ClassComponent): 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({ * patchProp, * ...nodeOps * }) * ``` */ export declare function createRenderer(options: RendererOptions): Renderer; /** * Compiler runtime helper for creating dynamic slots object * @private */ export declare function createSlots(slots: Record, dynamicSlots: (CompiledSlotDescriptor | CompiledSlotDescriptor[] | undefined)[]): Record; /** * @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, 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 } declare type Data = Record; export { DebuggerEvent } declare type DebuggerHook = (e: DebuggerEvent) => void; export { DeepReadonly } declare type DefaultFactory = (props: Data) => T | null | undefined; declare type DefaultKeys = { [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(source: AsyncComponentLoader | AsyncComponentOptions): T; export declare type DefineComponent, EE extends string = string, PP = PublicProps, Props = Readonly>, Defaults = ExtractDefaultPropTypes> = ComponentPublicInstanceConstructor & Props> & ComponentOptionsBase & PP; export declare function defineComponent(setup: (props: Readonly, ctx: SetupContext) => RawBindings | RenderFunction): DefineComponent; export declare function defineComponent(options: ComponentOptionsWithoutProps): DefineComponent; export declare function defineComponent, EE extends string = string>(options: ComponentOptionsWithArrayProps): DefineComponent, RawBindings, D, C, M, Mixin, Extends, E, EE>; export declare function defineComponent, RawBindings, D, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = Record, EE extends string = string>(options: ComponentOptionsWithObjectProps): DefineComponent; export declare function defineEmit>(emitOptions?: E | EE[]): TypeEmit extends undefined ? InferredEmit : TypeEmit; /** * Compile-time-only helper used for declaring props inside `