declare type ASTModifiers = { [key: string]: boolean; }; declare type AsyncComponentFactory = () => { component: Promise; loading?: any; error?: any; delay?: number; timeout?: number; }; declare interface AsyncComponentOptions { loader: Function; loadingComponent?: any; errorComponent?: any; delay?: number; timeout?: number; suspensible?: boolean; onError?: (error: Error, retry: () => void, fail: () => void, attempts: number) => any; } declare type BaseTypes = string | number | boolean; declare type Builtin = Primitive | Function | Date | Error | RegExp; declare type CollectionTypes = IterableCollections | WeakCollections; /* Excluded from this release type: Component */ /* Excluded from this release type: ComponentOptions */ export declare function computed(getter: ComputedGetter, debugOptions?: DebuggerOptions): ComputedRef; export declare function computed(options: WritableComputedOptions, debugOptions?: DebuggerOptions): WritableComputedRef; export declare type ComputedGetter = (...args: any[]) => T; export declare interface ComputedRef extends WritableComputedRef { readonly value: T; [ComputedRefSymbol]: true; } declare const ComputedRefSymbol: unique symbol; export declare type ComputedSetter = (v: T) => void; /* Excluded from this release type: Config */ export declare function customRef(factory: CustomRefFactory): Ref; export declare type CustomRefFactory = (track: () => void, trigger: () => void) => { get: () => T; set: (value: T) => void; }; export declare type DebuggerEvent = { /* Excluded from this release type: effect */ } & DebuggerEventExtraInfo; export declare type DebuggerEventExtraInfo = { target: object; type: TrackOpTypes | TriggerOpTypes; key?: any; newValue?: any; oldValue?: any; }; export declare interface DebuggerOptions { onTrack?: (event: DebuggerEvent) => void; onTrigger?: (event: DebuggerEvent) => void; } export declare type DeepReadonly = T extends Builtin ? T : T extends Map ? ReadonlyMap, DeepReadonly> : T extends ReadonlyMap ? ReadonlyMap, DeepReadonly> : T extends WeakMap ? WeakMap, DeepReadonly> : T extends Set ? ReadonlySet> : T extends ReadonlySet ? ReadonlySet> : T extends WeakSet ? WeakSet> : T extends Promise ? Promise> : T extends Ref ? Readonly>> : T extends {} ? { readonly [K in keyof T]: DeepReadonly; } : Readonly; /* Excluded from this release type: defineAsyncComponent */ /* Excluded from this release type: defineComponent */ /** * Delete a property and trigger change if necessary. */ export declare function del(array: T[], key: number): void; export declare function del(object: object, key: string | number): void; /* Excluded from this release type: Dep */ /* Excluded from this release type: DepTarget */ export declare class EffectScope { detached: boolean; /* Excluded from this release type: active */ /* Excluded from this release type: effects */ /* Excluded from this release type: cleanups */ /* Excluded from this release type: parent */ /* Excluded from this release type: scopes */ /* Excluded from this release type: _vm */ /** * track a child scope's index in its parent's scopes array for optimized * removal */ private index; constructor(detached?: boolean); run(fn: () => T): T | undefined; /* Excluded from this release type: on */ /* Excluded from this release type: off */ stop(fromParent?: boolean): void; } export declare function effectScope(detached?: boolean): EffectScope; export declare type ErrorCapturedHook = (err: TError, instance: any, info: string) => boolean | void; /* Excluded from this release type: getCurrentInstance */ export declare function getCurrentScope(): EffectScope | undefined; /* Excluded from this release type: GlobalAPI */ /* Excluded from this release type: h */ declare type IfAny = 0 extends 1 & T ? Y : N; export declare function inject(key: InjectionKey | string): T | undefined; export declare function inject(key: InjectionKey | string, defaultValue: T, treatDefaultAsFactory?: false): T; export declare function inject(key: InjectionKey | string, defaultValue: T | (() => T), treatDefaultAsFactory: true): T; export declare interface InjectionKey extends Symbol { } declare type InjectKey = string | Symbol; export declare function isProxy(value: unknown): boolean; export declare function isReactive(value: unknown): boolean; export declare function isReadonly(value: unknown): boolean; export declare function isRef(r: Ref | unknown): r is Ref; export declare function isShallow(value: unknown): boolean; declare type IterableCollections = Map | Set; declare type MapSources = { [K in keyof T]: T[K] extends WatchSource ? Immediate extends true ? V | undefined : V : T[K] extends object ? Immediate extends true ? T[K] | undefined : T[K] : never; }; export declare function markRaw(value: T): T & { [RawSymbol]?: true; }; /* Excluded from this release type: mergeDefaults */ declare type MultiWatchSources = (WatchSource | object)[]; export declare function nextTick(): Promise; export declare function nextTick(this: T, cb: (this: T, ...args: any[]) => any): void; export declare function nextTick(cb: (this: T, ...args: any[]) => any, ctx: T): void; export declare const onActivated: (fn: () => void, target?: any) => void; export declare const onBeforeMount: (fn: () => void, target?: any) => void; export declare const onBeforeUnmount: (fn: () => void, target?: any) => void; export declare const onBeforeUpdate: (fn: () => void, target?: any) => void; declare type OnCleanup = (cleanupFn: () => void) => void; export declare const onDeactivated: (fn: () => void, target?: any) => void; export declare function onErrorCaptured(hook: ErrorCapturedHook, target?: any): void; export declare const onMounted: (fn: () => void, target?: any) => void; export declare const onRenderTracked: (fn: (e: DebuggerEvent) => any, target?: any) => void; export declare const onRenderTriggered: (fn: (e: DebuggerEvent) => any, target?: any) => void; export declare function onScopeDispose(fn: () => void): void; export declare const onServerPrefetch: (fn: () => void, target?: any) => void; export declare const onUnmounted: (fn: () => void, target?: any) => void; export declare const onUpdated: (fn: () => void, target?: any) => void; declare type Primitive = string | number | boolean | bigint | symbol | undefined | null; declare type PropOptions = { type?: Function | Array | null; default?: any; required?: boolean | null; validator?: Function | null; }; export declare function provide(key: InjectionKey | string | number, value: T): void; export declare function proxyRefs(objectWithRefs: T): ShallowUnwrapRef; declare const RawSymbol: unique symbol; export declare function reactive(target: T): UnwrapNestedRefs; export declare const enum ReactiveFlags { SKIP = "__v_skip", IS_READONLY = "__v_isReadonly", IS_SHALLOW = "__v_isShallow", RAW = "__v_raw" } export declare function readonly(target: T): DeepReadonly>; export declare interface Ref { value: T; /** * Type differentiator only. * We need this to be in public d.ts but don't want it to show up in IDE * autocomplete, so we use a private Symbol instead. */ [RefSymbol]: true; /* Excluded from this release type: dep */ /* Excluded from this release type: __v_isRef */ } export declare function ref(value: T): [T] extends [Ref] ? T : Ref>; export declare function ref(value: T): Ref>; export declare function ref(): Ref; /* Excluded from this release type: RefFlag */ declare const RefSymbol: unique symbol; /** * This is a special exported interface for other packages to declare * additional types that should bail out for ref unwrapping. For example * \@vue/runtime-dom can declare it like so in its d.ts: * * ``` ts * declare module 'vue' { * export interface RefUnwrapBailTypes { * runtimeDOMBailTypes: Node | Window * } * } * ``` * * Note that api-extractor somehow refuses to include `declare module` * augmentations in its generated d.ts, so we have to manually append them * to the final generated d.ts in our build process. */ export declare interface RefUnwrapBailTypes { runtimeDOMBailTypes: Node | Window; } /* Excluded from this release type: ScopedSlotsData */ /** * Set a property on an object. Adds the new property and * triggers change notification if the property doesn't * already exist. */ export declare function set(array: T[], key: number, value: T): T; export declare function set(object: object, key: string | number, value: T): T; /* Excluded from this release type: SetupContext */ export declare type ShallowReactive = T & { [ShallowReactiveMarker]?: true; }; /** * Return a shallowly-reactive copy of the original object, where only the root * level properties are reactive. It also does not auto-unwrap refs (even at the * root level). */ export declare function shallowReactive(target: T): ShallowReactive; declare const ShallowReactiveMarker: unique symbol; /** * Returns a reactive-copy of the original object, where only the root level * properties are readonly, and does NOT unwrap refs nor recursively convert * returned properties. * This is used for creating the props proxy object for stateful components. */ export declare function shallowReadonly(target: T): Readonly; export declare type ShallowRef = Ref & { [ShallowRefMarker]?: true; }; export declare function shallowRef(value: T): T extends Ref ? T : ShallowRef; export declare function shallowRef(value: T): ShallowRef; export declare function shallowRef(): ShallowRef; declare const ShallowRefMarker: unique symbol; export declare type ShallowUnwrapRef = { [K in keyof T]: T[K] extends Ref ? V : T[K] extends Ref | undefined ? unknown extends V ? undefined : V | undefined : T[K]; }; declare interface SimpleSet { has(key: string | number): boolean; add(key: string | number): any; clear(): void; } export declare function toRaw(observed: T): T; export declare type ToRef = IfAny, [T] extends [Ref] ? T : Ref>; export declare function toRef(object: T, key: K): ToRef; export declare function toRef(object: T, key: K, defaultValue: T[K]): ToRef>; export declare type ToRefs = { [K in keyof T]: ToRef; }; export declare function toRefs(object: T): ToRefs; export declare const enum TrackOpTypes { GET = "get", TOUCH = "touch" } export declare const enum TriggerOpTypes { SET = "set", ADD = "add", DELETE = "delete", ARRAY_MUTATION = "array mutation" } export declare function triggerRef(ref: Ref): void; export declare function unref(ref: T | Ref): T; export declare type UnwrapNestedRefs = T extends Ref ? T : UnwrapRefSimple; export declare type UnwrapRef = T extends ShallowRef ? V : T extends Ref ? UnwrapRefSimple : UnwrapRefSimple; declare type UnwrapRefSimple = T extends Function | CollectionTypes | BaseTypes | Ref | RefUnwrapBailTypes[keyof RefUnwrapBailTypes] | { [RawSymbol]?: true; } ? T : T extends Array ? { [K in keyof T]: UnwrapRefSimple; } : T extends object & { [ShallowReactiveMarker]?: never; } ? { [P in keyof T]: P extends symbol ? T[P] : UnwrapRef; } : T; /* Excluded from this release type: useAttrs */ export declare function useCssModule(name?: string): Record; /** * Runtime helper for SFC's CSS variable injection feature. * @private */ export declare function useCssVars(getter: (vm: Record, setupProxy: Record) => Record): void; /* Excluded from this release type: useListeners */ /* Excluded from this release type: useSlots */ /** * Note: also update dist/vue.runtime.mjs when adding new exports to this file. */ export declare const version: string; /* Excluded from this release type: VNode */ /* Excluded from this release type: VNodeChildren */ /* Excluded from this release type: VNodeComponentOptions */ /* Excluded from this release type: VNodeData */ /* Excluded from this release type: VNodeDirective */ export declare function watch = false>(sources: [...T], cb: WatchCallback, MapSources>, options?: WatchOptions): WatchStopHandle; export declare function watch, Immediate extends Readonly = false>(source: T, cb: WatchCallback, MapSources>, options?: WatchOptions): WatchStopHandle; export declare function watch = false>(source: WatchSource, cb: WatchCallback, options?: WatchOptions): WatchStopHandle; export declare function watch = false>(source: T, cb: WatchCallback, options?: WatchOptions): WatchStopHandle; export declare type WatchCallback = (value: V, oldValue: OV, onCleanup: OnCleanup) => any; export declare type WatchEffect = (onCleanup: OnCleanup) => void; export declare function watchEffect(effect: WatchEffect, options?: WatchOptionsBase): WatchStopHandle; /* Excluded from this release type: Watcher */ /* Excluded from this release type: WatcherOptions */ export declare interface WatchOptions extends WatchOptionsBase { immediate?: Immediate; deep?: boolean; } export declare interface WatchOptionsBase extends DebuggerOptions { flush?: 'pre' | 'post' | 'sync'; } export declare function watchPostEffect(effect: WatchEffect, options?: DebuggerOptions): WatchStopHandle; export declare type WatchSource = Ref | ComputedRef | (() => T); export declare type WatchStopHandle = () => void; export declare function watchSyncEffect(effect: WatchEffect, options?: DebuggerOptions): WatchStopHandle; declare type WeakCollections = WeakMap | WeakSet; export declare interface WritableComputedOptions { get: ComputedGetter; set: ComputedSetter; } export declare interface WritableComputedRef extends Ref { readonly effect: any; } export { }