@codethread/tstl-validate
Version:
Fork and adaptation of valibot for use in typescript-to-lua
26 lines (25 loc) • 655 B
TypeScript
/** @noSelfInFile */
import type { BaseSchema, Pipe } from "../../types";
/**
* Boolean schema type.
*/
export type BooleanSchema<TOutput = boolean> = BaseSchema<boolean, TOutput> & {
schema: "boolean";
};
/**
* Creates a boolean schema.
*
* @param pipe A validation and transformation pipe.
*
* @returns A boolean schema.
*/
export declare function boolean(pipe?: Pipe<boolean>): BooleanSchema;
/**
* Creates a boolean schema.
*
* @param error The error message.
* @param pipe A validation and transformation pipe.
*
* @returns A boolean schema.
*/
export declare function boolean(error?: string, pipe?: Pipe<boolean>): BooleanSchema;