@nestjs/class-transformer
Version:
Fork of the class-transformer package. Proper decorator-based transformation / serialization / deserialization of plain javascript objects to class constructors
25 lines (24 loc) • 744 B
TypeScript
import { TypeHelpOptions, TypeOptions } from '..';
/**
* This object represents metadata assigned to a property via the @Type decorator.
*/
export interface TypeMetadata {
target: Function;
/**
* The property name this metadata belongs to on the target (property only).
*/
propertyName: string;
/**
* The type guessed from assigned Reflect metadata ('design:type')
*/
reflectedType: any;
/**
* The custom function provided by the user in the @Type decorator which
* returns the target type for the transformation.
*/
typeFunction: (options?: TypeHelpOptions) => Function;
/**
* Options passed to the @Type operator for this property.
*/
options: TypeOptions;
}