import { AllNode, BaseCodegenResult, CodegenOptions as CodegenOptions$1, CodegenSourceMapGenerator, CommentNode, CompilerCompatOptions, CompilerError, CompilerOptions as CompilerOptions$1, CompoundExpressionNode, DirectiveNode, ElementNode, RootNode, SimpleExpressionNode, SourceLocation, TemplateChildNode, TemplateNode, TransformOptions, parse } from "@vue/compiler-dom"; import { IfAny, IsKeyValues, LooseRequired, Namespace, NormalizedStyle, OverloadParameters, PatchFlags, Prettify, SlotFlags, UnionToIntersection, VaporSlotStability, camelize, capitalize, extend, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from "@vue/shared"; import "@babel/parser"; //#endregion //#region packages/reactivity/src/constants.d.ts declare enum TrackOpTypes { GET = "get", HAS = "has", ITERATE = "iterate" } declare enum TriggerOpTypes { SET = "set", ADD = "add", DELETE = "delete", CLEAR = "clear" } declare enum ReactiveFlags$1 { SKIP = "__v_skip", IS_REACTIVE = "__v_isReactive", IS_READONLY = "__v_isReadonly", IS_SHALLOW = "__v_isShallow", RAW = "__v_raw", IS_REF = "__v_isRef" } //#endregion //#region packages/reactivity/src/effectScope.d.ts declare class EffectScope implements ReactiveNode { deps: Link | undefined; depsTail: Link | undefined; subs: Link | undefined; subsTail: Link | undefined; flags: number; /** * @internal */ cleanups: (() => void)[]; /** * @internal */ cleanupsLength: number; constructor(detached?: boolean); get active(): boolean; pause(): void; /** * Resumes the effect scope, including all child scopes and effects. */ resume(): void; run(fn: () => T): T | undefined; stop(): void; /** * @internal */ reset(): void; } /** * Creates an effect scope object which can capture the reactive effects (i.e. * computed and watchers) created within it so that these effects can be * disposed together. For detailed use cases of this API, please consult its * corresponding {@link https://github.com/vuejs/rfcs/blob/master/active-rfcs/0041-reactivity-effect-scope.md | RFC}. * * @param detached - Can be used to create a "detached" effect scope. * @see {@link https://vuejs.org/api/reactivity-advanced.html#effectscope} */ declare function effectScope(detached?: boolean): EffectScope; /** * Returns the current active effect scope if there is one. * * @see {@link https://vuejs.org/api/reactivity-advanced.html#getcurrentscope} */ declare function getCurrentScope(): EffectScope | undefined; /** * Registers a dispose callback on the current active effect scope. The * callback will be invoked when the associated effect scope is stopped. * * @param fn - The callback function to attach to the scope's cleanup. * @see {@link https://vuejs.org/api/reactivity-advanced.html#onscopedispose} */ declare function onScopeDispose(fn: () => void, failSilently?: boolean): void; //#endregion //#region packages/reactivity/src/system.d.ts interface ReactiveNode { deps?: Link; depsTail?: Link; subs?: Link; subsTail?: Link; flags: ReactiveFlags; } interface Link { version: number; dep: ReactiveNode | ComputedRefImpl | ReactiveEffect | EffectScope; sub: ReactiveNode | ComputedRefImpl | ReactiveEffect | EffectScope; prevSub: Link | undefined; nextSub: Link | undefined; prevDep: Link | undefined; nextDep: Link | undefined; } declare const enum ReactiveFlags { None = 0, Mutable = 1, Watching = 2, RecursedCheck = 4, Recursed = 8, Dirty = 16, Pending = 32 } //#endregion //#region packages/reactivity/src/effect.d.ts type EffectScheduler = (...args: any[]) => any; type DebuggerEvent = { effect: ReactiveNode; } & DebuggerEventExtraInfo; type DebuggerEventExtraInfo = { target: object; type: TrackOpTypes | TriggerOpTypes; key: any; newValue?: any; oldValue?: any; oldTarget?: Map | Set; }; interface DebuggerOptions { onTrack?: (event: DebuggerEvent) => void; onTrigger?: (event: DebuggerEvent) => void; } interface ReactiveEffectOptions extends DebuggerOptions { scheduler?: EffectScheduler; onStop?: () => void; } interface ReactiveEffectRunner { (): T; effect: ReactiveEffect; } declare class ReactiveEffect implements ReactiveEffectOptions, ReactiveNode { deps: Link | undefined; depsTail: Link | undefined; subs: Link | undefined; subsTail: Link | undefined; flags: number; /** * @internal */ cleanups: (() => void)[]; /** * @internal */ cleanupsLength: number; onTrack?: (event: DebuggerEvent) => void; onTrigger?: (event: DebuggerEvent) => void; fn(): T; constructor(fn?: () => T); get active(): boolean; pause(): void; resume(): void; notify(): void; run(): T; stop(): void; get dirty(): boolean; } declare function effect(fn: () => T, options?: ReactiveEffectOptions): ReactiveEffectRunner; /** * Stops the effect associated with the given runner. * * @param runner - Association with the effect to stop tracking. */ declare function stop(runner: ReactiveEffectRunner): void; //#endregion //#region packages/reactivity/src/computed.d.ts declare const ComputedRefSymbol: unique symbol; declare const WritableComputedRefSymbol: unique symbol; interface BaseComputedRef extends Ref { [ComputedRefSymbol]: true; /** * @deprecated computed no longer uses effect */ effect: ComputedRefImpl; } interface ComputedRef extends BaseComputedRef { readonly value: T; } interface WritableComputedRef extends BaseComputedRef { [WritableComputedRefSymbol]: true; } type ComputedGetter = (oldValue?: T) => T; type ComputedSetter = (newValue: T) => void; interface WritableComputedOptions { get: ComputedGetter; set: ComputedSetter; } /** * @private exported by @vue/reactivity for Vue core use, but not exported from * the main vue package */ declare class ComputedRefImpl implements ReactiveNode { fn: ComputedGetter; private readonly setter; /** * @internal */ _value: T | undefined; subs: Link | undefined; subsTail: Link | undefined; deps: Link | undefined; depsTail: Link | undefined; flags: ReactiveFlags; /** * @internal */ readonly __v_isRef = true; /** * @internal */ readonly __v_isReadonly: boolean; get effect(): this; get dep(): ReactiveNode; /** * @internal * for backwards compat */ get _dirty(): boolean; /** * @internal * for backwards compat */ set _dirty(v: boolean); onTrack?: (event: DebuggerEvent) => void; onTrigger?: (event: DebuggerEvent) => void; constructor(fn: ComputedGetter, setter: ComputedSetter | undefined); get value(): T; set value(newValue: T); update(): boolean; } /** * Takes a getter function and returns a readonly reactive ref object for the * returned value from the getter. It can also take an object with get and set * functions to create a writable ref object. * * @example * ```js * // Creating a readonly computed ref: * const count = ref(1) * const plusOne = computed(() => count.value + 1) * * console.log(plusOne.value) // 2 * plusOne.value++ // error * ``` * * ```js * // Creating a writable computed ref: * const count = ref(1) * const plusOne = computed({ * get: () => count.value + 1, * set: (val) => { * count.value = val - 1 * } * }) * * plusOne.value = 1 * console.log(count.value) // 0 * ``` * * @param getter - Function that produces the next value. * @param debugOptions - For debugging. See {@link https://vuejs.org/guide/extras/reactivity-in-depth.html#computed-debugging}. * @see {@link https://vuejs.org/api/reactivity-core.html#computed} */ declare function computed$1(getter: ComputedGetter, debugOptions?: DebuggerOptions): ComputedRef; declare function computed$1(options: WritableComputedOptions, debugOptions?: DebuggerOptions): WritableComputedRef; //#endregion //#region packages/reactivity/src/reactive.d.ts type UnwrapNestedRefs = T extends Ref ? T : UnwrapRefSimple; declare const ReactiveMarkerSymbol: unique symbol; interface ReactiveMarker { [ReactiveMarkerSymbol]?: void; } type Reactive = UnwrapNestedRefs & (T extends readonly any[] ? ReactiveMarker : {}); /** * Returns a reactive proxy of the object. * * The reactive conversion is "deep": it affects all nested properties. A * reactive object also deeply unwraps any properties that are refs while * maintaining reactivity. * * @example * ```js * const obj = reactive({ count: 0 }) * ``` * * @param target - The source object. * @see {@link https://vuejs.org/api/reactivity-core.html#reactive} */ declare function reactive(target: T): Reactive; declare class ShallowReactiveBrandClass { private __shallowReactiveBrand?; } type ShallowReactiveBrand = ShallowReactiveBrandClass; type ShallowReactive = T & ShallowReactiveBrand; /** * Shallow version of {@link reactive}. * * Unlike {@link reactive}, there is no deep conversion: only root-level * properties are reactive for a shallow reactive object. Property values are * stored and exposed as-is - this also means properties with ref values will * not be automatically unwrapped. * * @example * ```js * const state = shallowReactive({ * foo: 1, * nested: { * bar: 2 * } * }) * * // mutating state's own properties is reactive * state.foo++ * * // ...but does not convert nested objects * isReactive(state.nested) // false * * // NOT reactive * state.nested.bar++ * ``` * * @param target - The source object. * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreactive} */ declare function shallowReactive(target: T): ShallowReactive; type Primitive = string | number | boolean | bigint | symbol | undefined | null; type Builtin = Primitive | Function | Date | Error | RegExp; 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; /** * Takes an object (reactive or plain) or a ref and returns a readonly proxy to * the original. * * A readonly proxy is deep: any nested property accessed will be readonly as * well. It also has the same ref-unwrapping behavior as {@link reactive}, * except the unwrapped values will also be made readonly. * * @example * ```js * const original = reactive({ count: 0 }) * * const copy = readonly(original) * * watchEffect(() => { * // works for reactivity tracking * console.log(copy.count) * }) * * // mutating original will trigger watchers relying on the copy * original.count++ * * // mutating the copy will fail and result in a warning * copy.count++ // warning! * ``` * * @param target - The source object. * @see {@link https://vuejs.org/api/reactivity-core.html#readonly} */ declare function readonly(target: T): DeepReadonly>; /** * Shallow version of {@link readonly}. * * Unlike {@link readonly}, there is no deep conversion: only root-level * properties are made readonly. Property values are stored and exposed as-is - * this also means properties with ref values will not be automatically * unwrapped. * * @example * ```js * const state = shallowReadonly({ * foo: 1, * nested: { * bar: 2 * } * }) * * // mutating state's own properties will fail * state.foo++ * * // ...but works on nested objects * isReadonly(state.nested) // false * * // works * state.nested.bar++ * ``` * * @param target - The source object. * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreadonly} */ declare function shallowReadonly(target: T): Readonly; /** * Checks if an object is a proxy created by {@link reactive} or * {@link shallowReactive} (or {@link ref} in some cases). * * @example * ```js * isReactive(reactive({})) // => true * isReactive(readonly(reactive({}))) // => true * isReactive(ref({}).value) // => true * isReactive(readonly(ref({})).value) // => true * isReactive(ref(true)) // => false * isReactive(shallowRef({}).value) // => false * isReactive(shallowReactive({})) // => true * ``` * * @param value - The value to check. * @see {@link https://vuejs.org/api/reactivity-utilities.html#isreactive} */ declare function isReactive(value: unknown): boolean; /** * Checks whether the passed value is a readonly object. The properties of a * readonly object can change, but they can't be assigned directly via the * passed object. * * The proxies created by {@link readonly} and {@link shallowReadonly} are * both considered readonly, as is a computed ref without a set function. * * @param value - The value to check. * @see {@link https://vuejs.org/api/reactivity-utilities.html#isreadonly} */ declare function isReadonly(value: unknown): boolean; declare function isShallow(value: unknown): boolean; /** * Checks if an object is a proxy created by {@link reactive}, * {@link readonly}, {@link shallowReactive} or {@link shallowReadonly}. * * @param value - The value to check. * @see {@link https://vuejs.org/api/reactivity-utilities.html#isproxy} */ declare function isProxy(value: any): boolean; /** * Returns the raw, original object of a Vue-created proxy. * * `toRaw()` can return the original object from proxies created by * {@link reactive}, {@link readonly}, {@link shallowReactive} or * {@link shallowReadonly}. * * This is an escape hatch that can be used to temporarily read without * incurring proxy access / tracking overhead or write without triggering * changes. It is **not** recommended to hold a persistent reference to the * original object. Use with caution. * * @example * ```js * const foo = {} * const reactiveFoo = reactive(foo) * * console.log(toRaw(reactiveFoo) === foo) // true * ``` * * @param observed - The object for which the "raw" value is requested. * @see {@link https://vuejs.org/api/reactivity-advanced.html#toraw} */ declare function toRaw(observed: T): T; type Raw = T & { [RawSymbol]?: true; }; /** * Marks an object so that it will never be converted to a proxy. Returns the * object itself. * * @example * ```js * const foo = markRaw({}) * console.log(isReactive(reactive(foo))) // false * * // also works when nested inside other reactive objects * const bar = reactive({ foo }) * console.log(isReactive(bar.foo)) // false * ``` * * **Warning:** `markRaw()` together with the shallow APIs such as * {@link shallowReactive} allow you to selectively opt-out of the default * deep reactive/readonly conversion and embed raw, non-proxied objects in your * state graph. * * @param value - The object to be marked as "raw". * @see {@link https://vuejs.org/api/reactivity-advanced.html#markraw} */ declare function markRaw(value: T): Raw; //#endregion //#region packages/reactivity/src/ref.d.ts declare const RefSymbol: unique symbol; declare const RawSymbol: unique symbol; interface Ref { get value(): T; set value(_: S); /** * 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; } /** * Checks if a value is a ref object. * * @param r - The value to inspect. * @see {@link https://vuejs.org/api/reactivity-utilities.html#isref} */ declare function isRef(r: Ref | unknown): r is Ref; /** * Takes an inner value and returns a reactive and mutable ref object, which * has a single property `.value` that points to the inner value. * * @param value - The object to wrap in the ref. * @see {@link https://vuejs.org/api/reactivity-core.html#ref} */ declare function ref$1(value: T): [T] extends [Ref] ? IfAny, T> : Ref, UnwrapRef | T>; declare function ref$1(): Ref; declare const ShallowRefMarker: unique symbol; type ShallowRef = Ref & { [ShallowRefMarker]?: true; }; /** * Shallow version of {@link ref}. * * @example * ```js * const state = shallowRef({ count: 1 }) * * // does NOT trigger change * state.value.count = 2 * * // does trigger change * state.value = { count: 2 } * ``` * * @param value - The "inner value" for the shallow ref. * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowref} */ declare function shallowRef(value: T): Ref extends T ? T extends Ref ? IfAny, T> : ShallowRef : ShallowRef; declare function shallowRef(): ShallowRef; /** * Force trigger effects that depends on a shallow ref. This is typically used * after making deep mutations to the inner value of a shallow ref. * * @example * ```js * const shallow = shallowRef({ * greet: 'Hello, world' * }) * * // Logs "Hello, world" once for the first run-through * watchEffect(() => { * console.log(shallow.value.greet) * }) * * // This won't trigger the effect because the ref is shallow * shallow.value.greet = 'Hello, universe' * * // Logs "Hello, universe" * triggerRef(shallow) * ``` * * @param ref - The ref whose tied effects shall be executed. * @see {@link https://vuejs.org/api/reactivity-advanced.html#triggerref} */ declare function triggerRef(ref: Ref): void; type MaybeRef = T | Ref | ShallowRef | WritableComputedRef; type MaybeRefOrGetter = MaybeRef | ComputedRef | (() => T); /** * Returns the inner value if the argument is a ref, otherwise return the * argument itself. This is a sugar function for * `val = isRef(val) ? val.value : val`. * * @example * ```js * function useFoo(x: number | Ref) { * const unwrapped = unref(x) * // unwrapped is guaranteed to be number now * } * ``` * * @param ref - Ref or plain value to be converted into the plain value. * @see {@link https://vuejs.org/api/reactivity-utilities.html#unref} */ declare function unref(ref: MaybeRef | ComputedRef): T; /** * Normalizes values / refs / getters to values. * This is similar to {@link unref}, except that it also normalizes getters. * If the argument is a getter, it will be invoked and its return value will * be returned. * * @example * ```js * toValue(1) // 1 * toValue(ref(1)) // 1 * toValue(() => 1) // 1 * ``` * * @param source - A getter, an existing ref, or a non-function value. * @see {@link https://vuejs.org/api/reactivity-utilities.html#tovalue} */ declare function toValue(source: MaybeRefOrGetter): T; /** * Returns a proxy for the given object that shallowly unwraps properties that * are refs. If the object already is reactive, it's returned as-is. If not, a * new reactive proxy is created. * * @param objectWithRefs - Either an already-reactive object or a simple object * that contains refs. */ declare function proxyRefs(objectWithRefs: T): ShallowUnwrapRef; type CustomRefFactory = (track: () => void, trigger: () => void) => { get: () => T; set: (value: S) => void; }; /** * Creates a customized ref with explicit control over its dependency tracking * and updates triggering. * * @param factory - The function that receives the `track` and `trigger` callbacks. * @see {@link https://vuejs.org/api/reactivity-advanced.html#customref} */ declare function customRef(factory: CustomRefFactory): Ref; type ToRefs = { [K in keyof T]: ToRef; }; type ArrayStringKey = T extends readonly any[] ? number extends T["length"] ? `${number}` : never : never; type ToRefKey = keyof T | ArrayStringKey; type ToRefValue> = K extends keyof T ? T[K] : T extends readonly (infer V)[] ? K extends ArrayStringKey ? V : never : never; /** * Converts a reactive object to a plain object where each property of the * resulting object is a ref pointing to the corresponding property of the * original object. Each individual ref is created using {@link toRef}. * * @param object - Reactive object to be made into an object of linked refs. * @see {@link https://vuejs.org/api/reactivity-utilities.html#torefs} */ declare function toRefs(object: T): ToRefs; type ToRef = IfAny, [T] extends [Ref] ? T : Ref>; /** * Used to normalize values / refs / getters into refs. * * @example * ```js * // returns existing refs as-is * toRef(existingRef) * * // creates a ref that calls the getter on .value access * toRef(() => props.foo) * * // creates normal refs from non-function values * // equivalent to ref(1) * toRef(1) * ``` * * Can also be used to create a ref for a property on a source reactive object. * The created ref is synced with its source property: mutating the source * property will update the ref, and vice-versa. * * @example * ```js * const state = reactive({ * foo: 1, * bar: 2 * }) * * const fooRef = toRef(state, 'foo') * * // mutating the ref updates the original * fooRef.value++ * console.log(state.foo) // 2 * * // mutating the original also updates the ref * state.foo++ * console.log(fooRef.value) // 3 * ``` * * @param source - A getter, an existing ref, a non-function value, or a * reactive object to create a property ref from. * @param [key] - (optional) Name of the property in the reactive object. * @see {@link https://vuejs.org/api/reactivity-utilities.html#toref} */ declare function toRef(value: T): T extends (() => infer R) ? Readonly> : T extends Ref ? T : Ref>; declare function toRef>(object: T, key: K): ToRef>; declare function toRef>(object: T, key: K, defaultValue: ToRefValue): ToRef, undefined>>; /** * 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/reactivity' { * export interface RefUnwrapBailTypes { * runtimeDOMBailTypes: Node | Window * } * } * ``` */ interface RefUnwrapBailTypes {} type ShallowUnwrapRef = T extends ShallowReactiveBrand ? T : { [K in keyof T]: DistributeRef; }; type DistributeRef = T extends Ref ? V : T; type UnwrapRef = T extends ShallowRef ? V : T extends Ref ? UnwrapRefSimple : UnwrapRefSimple; type UnwrapRefSimple = T extends Builtin | Ref | RefUnwrapBailTypes[keyof RefUnwrapBailTypes] | { [RawSymbol]?: true; } ? T : T extends ShallowReactiveBrand ? T : T extends Map ? Map> & UnwrapRef>> : T extends WeakMap ? WeakMap> & UnwrapRef>> : T extends Set ? Set> & UnwrapRef>> : T extends WeakSet ? WeakSet> & UnwrapRef>> : T extends ReadonlyArray ? { [K in keyof T]: UnwrapRefSimple; } : T extends object ? { [P in keyof T]: P extends symbol ? T[P] : UnwrapRef; } : T; //#endregion //#region packages/reactivity/src/dep.d.ts declare class Dep implements ReactiveNode { private map?; private key?; _subs: Link | undefined; subsTail: Link | undefined; flags: ReactiveFlags; constructor(map?: KeyToDepMap | undefined, key?: unknown | undefined); get subs(): Link | undefined; set subs(value: Link | undefined); } type KeyToDepMap = Map; //#endregion //#region packages/reactivity/src/watch.d.ts declare enum WatchErrorCodes { WATCH_GETTER = 2, WATCH_CALLBACK = 3, WATCH_CLEANUP = 4 } type WatchEffect = (onCleanup: OnCleanup) => void; type WatchSource = Ref | ComputedRef | (() => T); type WatchCallback = (value: V, oldValue: OV, onCleanup: OnCleanup) => any; type OnCleanup = (cleanupFn: () => void) => void; interface WatchOptions$1 extends DebuggerOptions { immediate?: Immediate; deep?: boolean | number; once?: boolean; onWarn?: (msg: string, ...args: any[]) => void; /** * @internal */ call?: (fn: Function | Function[], type: WatchErrorCodes, args?: unknown[]) => void; } type WatchStopHandle = () => void; interface WatchHandle extends WatchStopHandle { pause: () => void; resume: () => void; stop: () => void; } /** * Returns the current active effect if there is one. */ declare function getCurrentWatcher(): ReactiveEffect | undefined; /** * Registers a cleanup callback on the current active effect. This * registered cleanup callback will be invoked right before the * associated effect re-runs. * * @param cleanupFn - The callback function to attach to the effect's cleanup. * @param failSilently - if `true`, will not throw warning when called without * an active effect. * @param owner - The effect that this cleanup function should be attached to. * By default, the current active effect. */ declare function onWatcherCleanup(cleanupFn: () => void, failSilently?: boolean, owner?: WatcherEffect | undefined): void; declare class WatcherEffect extends ReactiveEffect { cb?: WatchCallback | null | undefined; options: WatchOptions$1; forceTrigger: boolean; isMultiSource: boolean; oldValue: any; boundCleanup: typeof onWatcherCleanup; constructor(source: WatchSource | WatchSource[] | WatchEffect | object, cb?: WatchCallback | null | undefined, options?: WatchOptions$1); run(initialRun?: boolean): void; } //#endregion //#region packages/runtime-core/src/apiComputed.d.ts declare const computed: typeof computed$1; //#endregion //#region packages/runtime-core/src/componentSlots.d.ts type Slot = (...args: IfAny) => VNode[]; type InternalSlots = { [name: string]: Slot | undefined; }; type Slots = Readonly; declare const SlotSymbol: unique symbol; type SlotsType = Record> = { [SlotSymbol]?: T; }; type StrictUnwrapSlotsType> = [keyof S] extends [never] ? Slots : Readonly & T; type UnwrapSlotsType> = [keyof S] extends [never] ? Slots : Readonly extends ((...args: any[]) => any) ? T[K] : Slot; }>>; type RawSlots$1 = { [name: string]: unknown; $stable?: boolean; /** * for tracking slot owner instance. This is attached during * normalizeChildren when the component vnode is created. * @internal */ _ctx?: ComponentInternalInstance | null; /** * indicates compiler generated slots * we use a reserved property instead of a vnode patchFlag because the slots * object may be directly passed down to a child component in a manual * render function, and the optimization hint need to be on the slot object * itself to be preserved. * @internal */ _?: SlotFlags; }; //#endregion //#region packages/runtime-core/src/scheduler.d.ts declare enum SchedulerJobFlags { QUEUED = 1, /** * Indicates whether the effect is allowed to recursively trigger itself * when managed by the scheduler. * * By default, a job cannot trigger itself because some built-in method calls, * e.g. Array.prototype.push actually performs reads as well (#1740) which * can lead to confusing infinite loops. * The allowed cases are component update functions and watch callbacks. * Component update functions may update child component props, which in turn * trigger flush: "pre" watch callbacks that mutates state that the parent * relies on (#1801). Watch callbacks doesn't track its dependencies so if it * triggers itself again, it's likely intentional and it is the user's * responsibility to perform recursive state mutation that eventually * stabilizes (#1727). */ ALLOW_RECURSE = 2, DISPOSED = 4, /** * Requeue a Suspense effect if its pending branch is discarded. * @internal */ REQUEUE_ON_SUSPENSE_DISCARD = 8 } interface SchedulerJob extends Function { order?: number; /** * flags can technically be undefined, but it can still be used in bitwise * operations just like 0. */ flags?: SchedulerJobFlags; /** * Attached by renderer.ts when setting up a component's render effect * Used to obtain component information when reporting max recursive updates. */ i?: GenericComponentInstance; } type SchedulerJobs = SchedulerJob | SchedulerJob[]; declare function nextTick(): Promise; declare function nextTick(this: T, fn: (this: T) => R | Promise): Promise; /** * @internal for runtime-vapor only */ declare function queueJob(job: SchedulerJob, id?: number, isPre?: boolean, order?: number): void; declare function queuePostFlushCb(jobs: SchedulerJobs, id?: number): void; /** * @internal */ declare function flushOnAppMount(instance?: GenericComponentInstance): void; //#endregion //#region packages/runtime-core/src/componentProps.d.ts type ComponentPropsOptions

= ComponentObjectPropsOptions

| string[]; type ComponentObjectPropsOptions

= { [K in keyof P]: Prop | null; }; type Prop = PropOptions | PropType; type DefaultFactory = (props: Data) => T | null | undefined; interface PropOptions { type?: PropType | true | null; required?: boolean; default?: D | DefaultFactory | null | undefined | object; validator?(value: unknown, props: Data): boolean; /** * @internal */ skipCheck?: boolean; /** * @internal */ skipFactory?: boolean; } type PropType = PropConstructor | (PropConstructor | null)[]; type PropConstructor = { new (...args: any[]): T & {}; } | { (): T; } | PropMethod; type PropMethod = { new (): TConstructor; (): T; readonly prototype: TConstructor; }; type RequiredKeys = { [K in keyof T]: T[K] extends { required: true; } | { default: any; } | BooleanConstructor | { type: BooleanConstructor; } ? T[K] extends { default: undefined | (() => undefined); } ? never : K : never; }[keyof T]; type OptionalKeys = Exclude>; 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]; type InferPropType = [T] extends [null] ? NullAsAny extends true ? any : null : [T] extends [{ type: null | true; }] ? any : [T] extends [ObjectConstructor | { type: ObjectConstructor; }] ? Record : [T] extends [BooleanConstructor | { type: BooleanConstructor; }] ? boolean : [T] extends [DateConstructor | { type: DateConstructor; }] ? Date : [T] extends [(infer U)[] | { type: (infer U)[]; }] ? U extends DateConstructor ? Date | InferPropType : InferPropType : [T] extends [Prop] ? unknown extends V ? keyof V extends never ? IfAny : V : V : T; /** * Extract prop types from a runtime props options object. * The extracted types are **internal** - i.e. the resolved props received by * the component. * - Boolean props are always present * - Props with default values are always present * * To extract accepted props from the parent, use {@link ExtractPublicPropTypes}. */ type ExtractPropTypes = { [K in keyof Pick>]: O[K] extends { default: any; } ? Exclude, undefined> : InferPropType; } & { [K in keyof Pick>]?: InferPropType; }; type PublicRequiredKeys = { [K in keyof T]: T[K] extends { required: true; } ? K : never; }[keyof T]; type PublicOptionalKeys = Exclude>; /** * Extract prop types from a runtime props options object. * The extracted types are **public** - i.e. the expected props that can be * passed to component. */ type ExtractPublicPropTypes = { [K in keyof Pick>]: InferPropType; } & { [K in keyof Pick>]?: InferPropType; }; declare enum BooleanFlags { shouldCast = 0, shouldCastTrue = 1 } type ExtractDefaultPropTypes = O extends object ? { [K in keyof Pick>]: InferPropType; } : {}; type NormalizedProp = PropOptions & { [BooleanFlags.shouldCast]?: boolean; [BooleanFlags.shouldCastTrue]?: boolean; }; /** * normalized value is a tuple of the actual normalized options * and an array of prop keys that need value casting (booleans and defaults) */ type NormalizedProps = Record; type NormalizedPropsOptions = [NormalizedProps, string[]] | []; /** * @internal for runtime-vapor */ declare function resolvePropValue>(options: NormalizedProps, key: string, value: unknown, instance: T, resolveDefault: (factory: (props: Data) => unknown, instance: T, key: string) => unknown, isAbsent?: boolean): unknown; /** * @internal for runtime-vapor only */ declare function baseNormalizePropsOptions(raw: ComponentPropsOptions | undefined, normalized: NonNullable, needCastKeys: NonNullable): void; /** * dev only * @internal */ declare function validateProps(rawProps: Data, resolvedProps: Data, options: NormalizedProps): void; //#endregion //#region packages/runtime-core/src/apiSetupHelpers.d.ts /** * Vue `