UNPKG

1.25 kBTypeScriptView Raw
1import { ExposeOptions, ExcludeOptions, TypeOptions, TransformOptions } from "./metadata/ExposeExcludeOptions";
2/**
3 * Defines a custom logic for value transformation.
4 */
5export declare function Transform(transformFn: (value: any) => any, options?: TransformOptions): (target: any, key: string) => void;
6/**
7 * Specifies a type of the property.
8 */
9export declare function Type(typeFunction?: (type?: TypeOptions) => Function): (target: any, key: string) => void;
10/**
11 * Marks property as included in the process of transformation. By default it includes the property for both
12 * constructorToPlain and plainToConstructor transformations, however you can specify on which of transformation types
13 * you want to skip this property.
14 */
15export declare function Expose(options?: ExposeOptions): (object: Object | Function, propertyName?: string) => void;
16/**
17 * Marks property as excluded from the process of transformation. By default it excludes the property for both
18 * constructorToPlain and plainToConstructor transformations, however you can specify on which of transformation types
19 * you want to skip this property.
20 */
21export declare function Exclude(options?: ExcludeOptions): (object: Object | Function, propertyName?: string) => void;