import type { OmitExactOptionalUndefined } from './exclue-exact-optional-undefined'; import type { Primitive } from './primitive'; /** * Deeply merges a tuple of objects from right to left. * * @example */ export type DeepMergeRight = OmitExactOptionalUndefined<{ [K in keyof A | keyof B]: (K extends keyof B ? B[K] : A[Extract]) extends infer V extends Primitive ? V : K extends keyof A ? K extends keyof B ? DeepMergeRight : A[K] : B[Extract]; }>;