transformable
Version:
Transforms plain objects to class instances and vice versa (a lightweight alternative to 'class-transformer')
7 lines (6 loc) • 412 B
TypeScript
import type { AttributeTransformationMap, Transformation } from './types';
export declare function getTransformation(prototype: Object, attributeName: string): Transformation | undefined;
export declare function setTransformation(prototype: Object, attributeName: string, transformation: Transformation): void;
declare global {
var __transformablePrototypeMap: WeakMap<Object, AttributeTransformationMap>;
}