import { Primitive } from '../types/Primitive'; import { Constructor } from '../types/Constructor'; import { PageList } from '../types/PageList'; import { List } from '../types/List'; import { Get } from '../types/Get'; import { DontInfer } from '../types/Types'; import { AnyKey } from '../types/AnyKey'; import { EnumConstructor } from '../types/Enum'; 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; }; }; }; export {};