/** * Schema type definitions for Document validation and serialization. * Extracted to avoid circular dependencies with Document class. */ export type ValidatorFunction = (value: unknown) => boolean; export type SchemaType = StringConstructor | NumberConstructor | BooleanConstructor | ObjectConstructor | ArrayConstructor | DateConstructor | ValidatorFunction; export type SerializedValue = string | number | boolean | null | SerializedValue[] | { [key: string]: SerializedValue; }; export type SchemaTypeOptions = { type: SchemaType; required?: boolean; default?: T; serialize?: (value: T) => SerializedValue; hydrate?: (value: string) => T; }; export type SchemaDefinition = { [K in keyof T]: SchemaTypeOptions | SchemaTypeOptions[] | SchemaDefinition; }; export type DocumentType = { get(key: K): T[K]; set(key: K, value: T[K] | undefined): void; getData(): T; setData(data: T): void; toJson(): string; save(): Promise; load(): Promise; delete(): Promise; dirty: boolean; deleted: boolean; }; export type InstanceMethods = { [key: string]: (this: DocumentType, ...args: unknown[]) => unknown; }; export type StaticMethods = { [key: string]: (this: any, ...args: unknown[]) => DocumentType | Promise> | unknown; }; //# sourceMappingURL=schema.d.ts.map