shelving
Version:
Toolkit for using data in JavaScript.
15 lines (14 loc) • 535 B
TypeScript
import type { SchemaOptions } from "./Schema.js";
import { Schema } from "./Schema.js";
/** Allowed options for `BooleanSchema` */
export interface BooleanSchemaOptions extends SchemaOptions {
readonly value?: boolean | undefined;
}
/** Define a valid boolean. */
export declare class BooleanSchema extends Schema<boolean> {
readonly value: boolean;
constructor({ value, ...options }: BooleanSchemaOptions);
validate(unsafeValue?: unknown): boolean;
}
/** Valid boolean. */
export declare const BOOLEAN: BooleanSchema;