typescript-domain
Version:
Decorator-based transformation of JSON or plain Javascript objects to classes
12 lines (11 loc) • 492 B
TypeScript
import type { Constructor, DebugFunction, PlainData } from './types';
export declare class Entity<T> {
private readonly _debugFunction?;
private readonly _debugSkipUndef?;
private _c;
constructor(_data?: PlainData<T> | null, _debugFunction?: DebugFunction | undefined, _debugSkipUndef?: boolean | undefined);
isValid(): boolean;
update(data?: PlainData<T>): void;
private _init;
}
export declare function Model<T extends Constructor>(constructor: T): Constructor;