UNPKG

@itrocks/length

Version:

Decorators @Length, @MinLength, @MaxLength to enforce fixed or flexible string length limits on class properties

4 lines (3 loc) 321 B
import { ObjectOrType } from '@itrocks/class-type'; export declare function MinLength<T extends object>(length?: number): import("@itrocks/decorator/property").DecorateCaller<T, Extract<keyof T, string | symbol>>; export declare function minLengthOf<T extends object>(target: ObjectOrType<T>, property: keyof T): number;