@codethread/tstl-validate
Version:
Fork and adaptation of valibot for use in typescript-to-lua
12 lines (11 loc) • 453 B
TypeScript
/** @noSelfInFile */
import type { ParseResult, ValidateInfo } from '../../types';
/**
* Creates a async custom validation function.
*
* @param requirement The async validation function.
* @param error The error message.
*
* @returns A async validation function.
*/
export declare function customAsync<TInput>(requirement: (input: TInput) => Promise<boolean>, error?: string): (input: TInput, info: ValidateInfo) => Promise<ParseResult<TInput>>;