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

x/valibot/src/methods/merge/index.ts>mergeAsync

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

Merges the entries of multiple async object schemas. Subsequent object entries overwrite the previous ones.

Type Parameters

TSchemas extends ObjectSchemas

Parameters

schemas: TSchemas

The schemas to be merged.

optional
pipe: PipeAsync<ObjectOutput<MergeObjects<TSchemas>, undefined>>

A validation and transformation pipe.

Merges the entries of multiple async object schemas. Subsequent object entries overwrite the previous ones.

Type Parameters

TSchemas extends ObjectSchemas

Parameters

schemas: TSchemas

The schemas to be merged.

optional
message: ErrorMessage

The error message.

optional
pipe: PipeAsync<ObjectOutput<MergeObjects<TSchemas>, undefined>>

A validation and transformation pipe.

Merges the entries of multiple async object schemas. Subsequent object entries overwrite the previous ones.

Type Parameters

TSchemas extends ObjectSchemas
TRest extends BaseSchema | BaseSchemaAsync | undefined

Parameters

schemas: TSchemas

The schemas to be merged.

rest: TRest

The object rest.

A validation and transformation pipe.

Merges the entries of multiple async object schemas. Subsequent object entries overwrite the previous ones.

Type Parameters

TSchemas extends ObjectSchemas
TRest extends BaseSchema | BaseSchemaAsync | undefined

Parameters

schemas: TSchemas

The schemas to be merged.

rest: TRest

The object rest.

optional
message: ErrorMessage

The error message.

A validation and transformation pipe.