import { Obj } from '../util/Obj'; import { ObjectHasKey } from '../object/ObjectHasKey'; /** * Merge second object into the first. * Deprecated, switch to Spread. * @deprecated */ // export type Overwrite = { [P in Exclude]: T[P] } & U; // ^ no-dependency version by Anders, works fine but uses intersection, yielding verbose types // export type Overwrite]: T[P] } & U> = Pick; // ^ my attempt at cleaning out the intersection, somehow makes AppendList/FromPairs/ZipObject fail export type Overwrite< K extends Obj, T extends Obj > = {[P in keyof T | keyof K]: { 1: T[P], 0: K[P] }[ObjectHasKey]};