import { transformAsync } from "https://deno.land/x/valibot@v0.24.0/src/methods/index.ts";
Adds an async transformation step to a schema, which is executed at the end of parsing and can change the output type.
Type Parameters
TSchema extends BaseSchema | BaseSchemaAsync
Returns
A transformed schema.
Adds an async transformation step to a schema, which is executed at the end of parsing and can change the output type.
Type Parameters
TSchema extends BaseSchema | BaseSchemaAsync
Parameters
schema: TSchema
The schema to be used.
action: (value: Output<TSchema>, info: TransformInfo) => TOutput | Promise<TOutput>
The transformation action.
optional
validate: BaseSchema<TOutput> | BaseSchemaAsync<TOutput>A validation schema.
Returns
A transformed schema.