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.
10 lines (9 loc) • 474 B
TypeScript
import { PropertyData } from '../types';
type PropertyDecoratorRegexData = PropertyData<string>;
/**
* @deprecated Use `field.regex()` 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 RegexProperty(regex: RegExp, data?: PropertyDecoratorRegexData): (target: any, propertyKey: string) => void;
export {};