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

x/valibot/src/schemas/record/utils/recordArgs/index.ts>recordArgs

The modular and type safe schema library for validating structural data 🤖
Go to Latest
function recordArgs
import { recordArgs } from "https://deno.land/x/valibot@v0.24.0/src/schemas/record/utils/recordArgs/index.ts";

Returns key, value, error and pipe from dynamic arguments.

Type Parameters

TKey extends RecordKey | RecordKeyAsync
TValue extends BaseSchema | BaseSchemaAsync
TPipe extends Pipe<any> | PipeAsync<any>

Parameters

arg1: TValue | TKey

First argument.

arg2:
| undefined

Second argument.

arg3: TPipe | ErrorMessage | undefined

Third argument.

arg4: TPipe | undefined

Fourth argument.

Returns

[
ErrorMessage | undefined,
TPipe | undefined,
]

The record arguments.