UNPKG

aptx-validator

Version:

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

16 lines (15 loc) 554 B
import { ARecord } from "."; import AllValidator from "./AllValidator"; import { ValidateFunction } from "./types"; /** * Validator for Boolean parameters, which includes multiple Boolean validation methods. */ declare class ObjectValidator<T extends ARecord = any, O extends boolean = false, N extends boolean = false> extends AllValidator<T, O, N> { #private; output: T; constructor(v?: T); custom(fn: ValidateFunction): this; optional(): ObjectValidator<T, true, N>; test(p?: any): boolean; } export default ObjectValidator;