UNPKG

@itrocks/length

Version:

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

4 lines (3 loc) 306 B
import { KeyOf, ObjectOrType } from '@itrocks/class-type'; export declare function MaxLength<T extends object>(length?: number): import("@itrocks/decorator/property").DecorateCaller<T>; export declare function maxLengthOf<T extends object>(target: ObjectOrType<T>, property: KeyOf<T>): number | undefined;