Skip to main content
Module

x/value_schema/dist-deno/schemas/boolean.ts

simple, easy-to-use, and declarative input validator; supports Node.js, TypeScript, and Deno
Go to Latest
File
import { NullableOptions } from "../libs/publicTypes.ts";import { BooleanSchema, OptionsForBoolean } from "../schemaClasses/BooleanSchema.ts";export function boolean(options: OptionsForBoolean & NullableOptions): BooleanSchema<null>;export function boolean(options: OptionsForBoolean): BooleanSchema;export function boolean(): BooleanSchema;/** * create schema * @param options Options * @returns schema */export function boolean(options: OptionsForBoolean = {}): BooleanSchema { return new BooleanSchema(options);}