/** * @import { ShallowRef, Ref, MaybeRefOrGetter } from 'vue' * @import { ModelOptions, UnknownModel } from '#composables' * @import { UnwrapRefOrGetter, NormalizeRef } from '#reactivity' */ /** * @typedef {{ * interactiveContext: boolean * readonly eldestValidatingGroup: typeof eldestValidatingGroup * readonly validationCancelFunctions: (() => void)[] * }} ProtectedModel */ /** @type { WeakMap } */ export const protectedModelMap: WeakMap; /** * @template { MaybeRefOrGetter } [T = unknown] * @template { boolean } [Shallow = boolean] * @template { boolean } [ExtendRef = boolean] * @template { Ref } [R = ( * ExtendRef extends true ? T extends Ref * ? T * : NormalizeRef, Shallow> * : NormalizeRef, Shallow> * )] * @extends { ExtendedRefImpl } */ export class ModelImpl = ExtendRef extends true ? T extends Ref ? T : NormalizeRef, Shallow> : NormalizeRef, Shallow>> extends ExtendedRefImpl, false> { /** * @template { unknown } T * @overload * @param { T } value * @returns { T extends UnknownModel ? T : ModelImpl, false, false> } */ constructor(value: T_1); /** * @template { MaybeRefOrGetter } T * @template { boolean } [Shallow = false] * @template { boolean } [ExtendRef = false] * @overload * @param { T } value * @param { T extends UnknownModel ? never : ModelOptions, Shallow, ExtendRef> } [options] * @returns { ModelImpl } */ constructor(value: T_1, options?: (T_1 extends UnknownModel ? never : ModelOptions, Shallow_1, ExtendRef_1, boolean, boolean>) | undefined); /** @type { ShallowRef } */ errors: ShallowRef; get hasErrors(): boolean; get isValid(): boolean; /** @this { UnknownModel } */ reset(this: UnknownModel): void; clear(): void; validate(force?: boolean, trigger?: boolean): boolean; #private; } export type ProtectedModel = { interactiveContext: boolean; readonly eldestValidatingGroup: typeof eldestValidatingGroup; readonly validationCancelFunctions: (() => void)[]; }; import type { Ref } from 'vue'; import type { UnwrapRefOrGetter } from '#reactivity'; import type { NormalizeRef } from '#reactivity'; import { ExtendedRefImpl } from '#reactivity'; import type { ShallowRef } from 'vue'; import type { UnknownModel } from '#composables'; import type { ModelOptions } from '#composables'; import { eldestValidatingGroup } from '#composables/.private/ModelGroupImpl'; //# sourceMappingURL=ModelImpl.d.ts.map