import { Get } from "../types/Get.js"; import { DontInfer } from "../types/Types.js"; import { Constructor } from "../types/Constructor.js"; import { AnyKey } from "../types/AnyKey.js"; import { List } from "../types/List.js"; import { EnumConstructor } from "../types/Enum.js"; import { PageList } from "../types/PageList.js"; import { Primitive } from "../types/Primitive.js"; //#region src/utils/View.d.ts type Func = (a: any, key?: string) => T; type FuncOn = (a: S, key?: string) => unknown; type Viewer = { key: string; f: Func; }; type ViewType = Primitive | EnumConstructor | Constructor | Func | View | undefined; type ViewValue = [S] extends [never] ? ViewType : Exclude | AnyKey | FuncOn; type ViewRecord = [S] extends [never] ? Partial>> : Partial>> & Partial, Extract>, typeof ignore>>; declare const ignore: unique symbol; declare const keep: unique symbol; declare const json: unique symbol; declare const spread = "view.spread"; export declare const toViewer: (key: string, value: ViewType) => Viewer; export declare class View { private views; readonly startsFrom: 'scratch' | 'source'; readonly viewers: Viewer[]; private spreads; constructor(views?: ViewRecord, startsFrom?: 'scratch' | 'source', viewers?: Viewer[], spreads?: Get[]); get fromSource(): View; spread(f: Get): View; from(source: PageList): PageList; from(source: List): List; from(source: T[]): V[]; from(source: T): V; same: (one?: unknown, another?: unknown) => boolean; private reduce; } export declare const isSimpleView: (a: unknown) => a is View; export declare const view: (views: ViewRecord, DontInfer>) => View; export declare const views: { readonly ignore: typeof ignore; readonly keep: typeof keep; readonly json: typeof json; readonly spread: "view.spread"; readonly skip: typeof ignore; readonly equals: (key: string, value: unknown) => (a: unknown) => boolean; readonly value: (value: unknown) => () => unknown; readonly coalesce: (...keys: string[]) => (a: unknown) => unknown; readonly or: { readonly key: (altKey: string) => (a: unknown, key?: string) => unknown; readonly value: (altValue: unknown) => (a: unknown, key?: string) => unknown; readonly func: (altFunc: Func) => (a: unknown, key?: string) => unknown; }; readonly to: (ctorOrFunc: Constructor | ((v: any) => T)) => ((a: any, key?: string) => T | undefined) & { or: { key: (altKey: string) => (a: unknown, key?: string) => unknown; value: (altValue: T) => (a: unknown, key?: string) => T; func: (altFunc: Func) => (a: unknown, key?: string) => unknown; }; }; }; //#endregion export {}; //# sourceMappingURL=View.d.ts.map