Type Alias MergeTwo<T, U>

MergeTwo<T, U>: {
    [K in keyof T | keyof U]: K extends keyof U
        ? U[K]
        : K extends keyof T
            ? T[K]
            : never
}

Merges two objects into one. If the same property is present in both objects, the value from the second object is used.

Type Parameters

  • T
  • U