UNPKG

transformable

Version:

Transforms plain objects to class instances and vice versa (a lightweight alternative to 'class-transformer')

13 lines (12 loc) 886 B
import { Class } from 'type-fest'; import type { Transformation } from './types'; export declare function Transform(transformation: Transformation): (targetPrototype: Object, attributeName: string) => void; export declare function TransformDate(): (targetPrototype: Object, attributeName: string) => void; export declare function TransformSet(): (targetPrototype: Object, attributeName: string) => void; export declare function TransformInstance(classProvider: () => Class<Object>, { excludeOutput }?: { excludeOutput?: boolean; }): (targetPrototype: Object, attributeName: string) => void; export declare function TransformInstances(classProvider: () => Class<Object>, { excludeOutput }?: { excludeOutput?: boolean; }): (targetPrototype: Object, attributeName: string) => void; export declare function ExcludeOutput(): (targetPrototype: Object, attributeName: string) => void;