UNPKG

@hkbyte/validator

Version:

Package for JSON Schema Validations and Parsing

18 lines (17 loc) 579 B
import { TypeBase } from '../base'; declare type ParsedType = boolean | null | undefined; declare type PostValidations = { returnDefaultOnNull?: boolean; default?: ParsedType; }; export declare class TypeBoolean extends TypeBase<NonNullable<ParsedType>> { private preValidations; private validations; private postValidations; constructor(); nullable(returnDefaultOnNull?: boolean): this; optional(): this; default(defaultValue: PostValidations['default']): this; parse(payload: unknown): Promise<ParsedType>; } export {};