Skip to main content
Module

x/valibot/mod.ts>coerceAsync

The modular and type safe schema library for validating structural data 🤖
Extremely Popular
Go to Latest
function coerceAsync
import { coerceAsync } from "https://deno.land/x/valibot@v0.8.0/mod.ts";

Coerces the input of a async schema to match the required type.

Parameters

schema: TSchema

The affected schema.

action: (value: unknown) => Input<TSchema> | Promise<Input<TSchema>>

The coerceation action.

Returns

The passed schema.