UNPKG

aptx-validator

Version:

轻量易用的 Node.js + Typescript 参数校验库

17 lines (16 loc) 559 B
import AllValidator from "./AllValidator"; import { ValidateFunction } from "./types"; /** * Validator for Array parameters, which includes multiple Array validation methods. */ declare class ArrayValidator<T extends AllValidator, O extends boolean = false> extends AllValidator<T, O, false> { #private; output: T; constructor(v?: T); custom(fn: ValidateFunction): this; optional(): ArrayValidator<T, true>; minLength(min: number): this; maxLength(max: number): this; test(p?: any): boolean; } export default ArrayValidator;