UNPKG

@codethread/tstl-validate

Version:

Fork and adaptation of valibot for use in typescript-to-lua

26 lines (25 loc) 640 B
/** @noSelfInFile */ import type { BaseSchema, Pipe } from "../../types"; /** * Number schema type. */ export type NumberSchema<TOutput = number> = BaseSchema<number, TOutput> & { schema: "number"; }; /** * Creates a number schema. * * @param pipe A validation and transformation pipe. * * @returns A number schema. */ export declare function number(pipe?: Pipe<number>): NumberSchema; /** * Creates a number schema. * * @param error The error message. * @param pipe A validation and transformation pipe. * * @returns A number schema. */ export declare function number(error?: string, pipe?: Pipe<number>): NumberSchema;