ts-deserializable
Version:
Decorator pattern for deserializing unverified data to an instance of a class in typescript.
13 lines (12 loc) • 365 B
TypeScript
import "reflect-metadata";
export interface Attribute {
type: string;
fallback: any;
}
export declare namespace DsAttributes {
function get(target: any): any | undefined;
function set(target: any, attributes: {
[key: string]: Attribute;
}): void;
function add(target: any, key: string, type: any, fallback: any): void;
}