UNPKG

@decaf-ts/decorator-validation

Version:
32 lines (31 loc) 895 B
import { Model } from "./Model"; /** * @summary Helper Function to override constructors * * @template M the model instance type * * @param {Function} constructor * @param {any[]} [args] * @return {M} the new instance * * @function construct * @memberOf module:decorator-validation */ export declare function construct<M extends Model>(constructor: any, ...args: any[]): M; /** * @summary Recursively finds the last prototype before Object * @param {object} obj * * @function findLastProtoBeforeObject * @memberOf module:decorator-validation */ export declare function findLastProtoBeforeObject(obj: object): object; /** * @sumary binds the {@link Model} class as a root prototype of the provided instance * * @param {unknown} obj * * @function bindModelPrototype * @memberOf module:decorator-validation */ export declare function bindModelPrototype(obj: unknown): void;