Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/valibot/src/index.ts>map

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

Creates a map schema.

Type Parameters

TMapKey extends BaseSchema
TMapValue extends BaseSchema

Parameters

key: TMapKey

The key schema.

value: TMapValue

The value schema.

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

A validation and transformation pipe.

Creates a map schema.

Type Parameters

TMapKey extends BaseSchema
TMapValue extends BaseSchema

Parameters

key: TMapKey

The key schema.

value: TMapValue

The value schema.

optional
error: string

The error message.

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

A validation and transformation pipe.