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

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

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

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

Type Parameters

TSchemas extends ObjectSchemas

Parameters

schemas: TSchemas

The schemas to be merged.

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

A validation and transformation pipe.

Merges the entries of multiple 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: Pipe<ObjectOutput<MergeObjects<TSchemas>, undefined>>

A validation and transformation pipe.

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

Type Parameters

TSchemas extends ObjectSchemas
TRest extends BaseSchema | undefined

Parameters

schemas: TSchemas

The schemas to be merged.

rest: TRest

The object rest.

A validation and transformation pipe.

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

Type Parameters

TSchemas extends ObjectSchemas
TRest extends BaseSchema | 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.