Skip to main content
Module

x/valibot/mod.ts>mapAsync

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

Creates an async map schema.

Type Parameters

TMapKey extends BaseSchema | BaseSchemaAsync
TMapValue extends BaseSchema | BaseSchemaAsync

Parameters

key: TMapKey

The key schema.

value: TMapValue

The value schema.

optional
pipe: PipeAsync<MapOutput<TMapKey, TMapValue>>

A validation and transformation pipe.

Returns

MapSchemaAsync<TMapKey, TMapValue>

An async map schema.

Creates an async map schema.

Type Parameters

TMapKey extends BaseSchema | BaseSchemaAsync
TMapValue extends BaseSchema | BaseSchemaAsync

Parameters

key: TMapKey

The key schema.

value: TMapValue

The value schema.

optional
error: string

The error message.

optional
pipe: PipeAsync<MapOutput<TMapKey, TMapValue>>

A validation and transformation pipe.

Returns

MapSchemaAsync<TMapKey, TMapValue>

An async map schema.