UNPKG

@codethread/tstl-validate

Version:

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

12 lines (11 loc) 412 B
/** @noSelfInFile */ import type { ParseResult, ValidateInfo } from '../../types'; /** * Creates a custom validation function. * * @param requirement The validation function. * @param error The error message. * * @returns A validation function. */ export declare function custom<TInput>(requirement: (input: TInput) => boolean, error?: string): (input: TInput, info: ValidateInfo) => ParseResult<TInput>;