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

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

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

Merges objects types.

Type Parameters

TSchemas extends (ObjectSchema<any, any> | ObjectSchemaAsync<any, any>)[]
definition: TSchemas extends [infer TFirstSchema] ? TFirstSchema extends ObjectSchema<any, any> | ObjectSchemaAsync<any, any> ? TFirstSchema["entries"] : never : TSchemas extends [infer TFirstSchema, ...infer TRestSchemas] ? TFirstSchema extends ObjectSchema<any, any> | ObjectSchemaAsync<any, any> ? TRestSchemas extends (ObjectSchema<any, any> | ObjectSchemaAsync<any, any>)[] ? [TKey in Exclude<keyof TFirstSchema["entries"], keyof MergeObjects<TRestSchemas>>]: TFirstSchema["entries"][TKey] & MergeObjects<TRestSchemas> : never : never : never