import type { ComputeFlat } from "@effect-ts/core/Utils"; import * as Lens from "@effect-ts/monocle/Lens"; import type { EncSchemaForModel, EParserFor, FromPropertyRecord } from "./_api.js"; import * as MO from "./_schema.js"; import type { AnyProperty, EncodedOf, ParsedShapeOf, PropertyRecord } from "./custom.js"; export declare const nModelBrand: unique symbol; export type StringRecord = Record; export type AnyRecord = Record; export type AnyRecordSchema = MO.Schema; export interface Model extends Model2>, ComputeFlat>> { } export interface Model3 extends Model2>, ParsedShape2> { } export interface ModelEnc>> extends MM, ParsedShape, MO.ConstructorInputOf, MEnc, GetApiProps, ParsedShape2> { } export interface ModelEnc3 extends MM, ParsedShape, MO.ConstructorInputOf, MEnc, GetApiProps, ParsedShape2> { } export interface Model2 extends MM, MO.EncodedOf, GetApiProps, ParsedShape2> { } type GetApiProps = T extends MO.SchemaProperties ? Props : never; export interface MNModel, ConstructorInput = MO.ConstructorInputOf, Encoded = MO.EncodedOf, Props = GetApiProps> extends MM, ParsedShape, ConstructorInput, Encoded, Props, ComputeFlat>> { } export interface MM extends MO.Schema { new (_: ConstructorInput): ParsedShape2; [MO.schemaField]: Self; readonly parsed: ParsedShapeOf; readonly encoded: EncodedOf; readonly Model: SelfM; readonly lens: Lens.Lens; readonly lenses: RecordSchemaToLenses; readonly Parser: MO.ParserFor; readonly EParser: EParserFor; readonly Constructor: MO.ConstructorFor; readonly Encoder: MO.EncoderFor; readonly Guard: MO.GuardFor; readonly Arbitrary: MO.ArbitraryFor; } export declare function Model(__name?: string): (props: Props) => Model> & PropsExtensions; export declare function ModelEnc(__name?: string): (props: Props) => ModelEnc, Encoded, ComputeFlat | undefined; } : { readonly [h_1 in k]: MO.ParsedShapeOf; } : never; }[keyof Props]>>>> & PropsExtensions; export declare function Model3(__name?: string): (props: Props) => Model3> & PropsExtensions; export declare function Model4(__name?: string): (props: Props) => Model3> & PropsExtensions; export declare function ModelEnc3(__name?: string): (props: Props) => ModelEnc3, Encoded> & PropsExtensions; export declare function ModelEnc4(__name?: string): (props: Props) => ModelEnc3, Encoded> & PropsExtensions; export declare function MNModel(__name?: string): (props: ProvidedProps) => MNModel, ParsedShape, ConstructorInput, Encoded, Props> & PropsExtensions; export declare function fromModel(__name?: string): (props: Props) => Model> & PropsExtensions; export type RecordSchemaToLenses = { [K in keyof ParsedShapeOf]: Lens.Lens[K]>; }; export type PropsToLenses = { [K in keyof Props]: Lens.Lens>; }; export declare function lensFromProps(): (props: Props) => PropsToLenses; export declare function setSchema>(schemed: any, self: Self): void; /** * Automatically assign the name of the Class to the MO. */ export declare function useClassNameForSchema(cls: any): any; export type GetProps = Self extends { Api: { props: infer Props; }; } ? Props extends PropertyRecord ? Props : never : never; export interface PropsExtensions { include: >(fnc: (props: Props) => NewProps) => NewProps; pick:

(...keys: readonly P[]) => Pick; omit:

(...keys: readonly P[]) => Omit; } export declare function ModelSpecial(__name?: string): (self: Self) => Model & PropsExtensions>; export declare function ModelSpecialEnc(__name?: string): (self: Self) => ModelEnc>> & PropsExtensions>; export declare function ModelSpecial3(__name?: string): (self: Self) => Model3 & PropsExtensions>; export declare function ModelSpecialEnc3(__name?: string): (self: Self) => ModelEnc3 & PropsExtensions>; export {}; //# sourceMappingURL=Model.d.ts.map