UNPKG

bookish-potato-dto

Version:

A TypeScript DTO (Data Transfer Object) parsing and validation library. Define a schema once — get runtime validation and a fully inferred TypeScript type for free.

11 lines (10 loc) 606 B
import { PropertyData } from '../types'; import { EnumAllowedGenericType, EnumType } from '../_types'; type PropertyDecoratorEnumData<T extends EnumAllowedGenericType> = PropertyData<T>; /** * @deprecated Use `field.enum()` inside `defineDto()` instead. * The decorator API will be removed in the next major version (v2). * @see https://github.com/andrei-trukhin/bookish-potato-dto-issues/blob/main/MIGRATION.md */ export declare function EnumProperty<T extends EnumAllowedGenericType>(enumType: EnumType<T>, data?: PropertyDecoratorEnumData<T>): (target: any, propertyKey: string) => void; export {};