UNPKG

@itrocks/length

Version:

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

6 lines (5 loc) 360 B
import { KeyOf, ObjectOrType } from '@itrocks/class-type'; export * from './max-length'; export * from './min-length'; export declare function Length<T extends object>(length?: number): import("@itrocks/decorator/property").DecorateCaller<T>; export declare function lengthOf<T extends object>(target: ObjectOrType<T>, property: KeyOf<T>): number | undefined;