UNPKG

@itrocks/length

Version:

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

6 lines (5 loc) 437 B
import { ObjectOrType } from '@itrocks/class-type'; export { MaxLength, maxLengthOf } from './max-length'; export { MinLength, minLengthOf } from './min-length'; export declare function Length<T extends object>(length?: number): import("@itrocks/decorator/property").DecorateCaller<T, Extract<keyof T, string | symbol>>; export declare function lengthOf<T extends object>(target: ObjectOrType<T>, property: keyof T): number | undefined;