import { type MergeObjects } from "https://deno.land/x/valibot@v0.30.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