Skip to main content
Module

x/valibot/mod.ts>recordAsync

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

Creates an async record schema.

Type Parameters

TRecordValue extends BaseSchema | BaseSchemaAsync

Parameters

The value schema.

optional
pipe: PipeAsync<RecordOutput<StringSchema, TRecordValue>>

A validation and transformation pipe.

Returns

RecordSchemaAsync<TRecordValue>

An async record schema.

Creates an async record schema.

Type Parameters

TRecordValue extends BaseSchema | BaseSchemaAsync

Parameters

The value schema.

optional
error: string

The error message.

optional
pipe: PipeAsync<RecordOutput<StringSchema, TRecordValue>>

A validation and transformation pipe.

Returns

RecordSchemaAsync<TRecordValue>

An async record schema.

Creates an async record schema.

Type Parameters

TRecordKey extends RecordKeyAsync
TRecordValue extends BaseSchema | BaseSchemaAsync

Parameters

The key schema.

The value schema.

optional
pipe: PipeAsync<RecordOutput<TRecordKey, TRecordValue>>

A validation and transformation pipe.

Returns

RecordSchemaAsync<TRecordValue, TRecordKey>

An async record schema.

Creates an async record schema.

Type Parameters

TRecordKey extends RecordKeyAsync
TRecordValue extends BaseSchema | BaseSchemaAsync

Parameters

The key schema.

The value schema.

optional
error: string

The error message.

optional
pipe: PipeAsync<RecordOutput<TRecordKey, TRecordValue>>

A validation and transformation pipe.

Returns

RecordSchemaAsync<TRecordValue, TRecordKey>

An async record schema.