Merges two object types into new type
Object to merge into
Object to merge and override keys from Object1
New object type with keys from Object1 and Object2. If a key exists in both Object1 and Object2, the key from Object2 will be used.
type Result = Merge<{ foo: string }, { foo: number; bar: string }>// ^? type Result = { foo: number; bar: string } Copy
type Result = Merge<{ foo: string }, { foo: number; bar: string }>// ^? type Result = { foo: number; bar: string }
Generated using TypeDoc
Merges two object types into new type