UNPKG

typescript-domain

Version:

Decorator-based transformation of JSON or plain Javascript objects to classes

5 lines (4 loc) 580 B
import type { Entity } from './entity'; import type { DebugFunction } from './types'; export declare function array<T, Input, Output extends Entity<T>>(Type: new (data: Input, debugFunction?: DebugFunction, debugSkipUndef?: boolean) => Output, debugFunction?: DebugFunction, debugSkipUndef?: boolean): (data: Input[]) => Output[]; export declare function object<T, Input, Output extends Entity<T>>(Type: new (data: Input, debugFunction?: DebugFunction, debugSkipUndef?: boolean) => Output, debugFunction?: DebugFunction, debugSkipUndef?: boolean): (data: Input) => Output | null;