UNPKG

@codethread/tstl-validate

Version:

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

18 lines (17 loc) 680 B
/** @noSelfInFile */ import type { BaseSchema, BaseSchemaAsync, Input, Output } from '../../types'; /** * Nullish schema async type. */ export type NullishSchemaAsync<TWrappedSchema extends BaseSchema | BaseSchemaAsync, TOutput = Output<TWrappedSchema> | null | undefined> = BaseSchemaAsync<Input<TWrappedSchema> | null | undefined, TOutput> & { schema: 'nullish'; wrapped: TWrappedSchema; }; /** * Creates an async nullish schema. * * @param wrapped The wrapped schema. * * @returns An async nullish schema. */ export declare function nullishAsync<TWrappedSchema extends BaseSchema | BaseSchemaAsync>(wrapped: TWrappedSchema): NullishSchemaAsync<TWrappedSchema>;