Skip to main content
Module

x/valibot/mod.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.6.0/mod.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.