UNPKG

tsbase

Version:

Base class libraries for TypeScript

13 lines (12 loc) 1.3 kB
import { IValidation } from '../Patterns/Validator/IValidation'; import { Model } from './Model'; import { InputTypes } from './inputTypes'; export declare function Label(label: string): (_: any, member: ClassFieldDecoratorContext) => void; export declare function Description(description: string): (_: any, member: ClassFieldDecoratorContext) => void; export declare function InputType(inputType: InputTypes): (_: any, member: ClassFieldDecoratorContext) => void; export declare function Validations<T>(validations: Array<IValidation<Model<T>>>): (_: any, member: ClassFieldDecoratorContext) => void; export declare function Options(options: Record<string, string>, customErrorMessage?: string): (_: any, member: ClassFieldDecoratorContext) => void; export declare function Required(customErrorMessage?: string): (_: any, member: ClassFieldDecoratorContext) => void; export declare function Range(minimum: number, maximum: number, customErrorMessage?: string): (_: any, member: ClassFieldDecoratorContext) => void; export declare function StringLength(minimum: number, maximum: number, customErrorMessage?: string): (_: any, member: ClassFieldDecoratorContext) => void; export declare function RegExp(regex: RegExp, customErrorMessage?: string): (_: any, member: ClassFieldDecoratorContext) => void;