The inferred record merge, including additions and replacement value types.
Required base keys stay required; definitely defined patch keys become required.
Other additions are optional because absent or undefined patch values are ignored.
Nullish whole patches retain Base, while null-valued properties replace their bases.
Union patches retain the possible unchanged and merged results.
Index signatures conservatively retain both base and patch possibilities.
Dates, regular expressions, mutable and readonly maps and sets, callable types,
and arrays are replacements. Other objects are modeled as ordinary records.
TypeScript cannot distinguish custom-class instances from matching plain records,
or inherited/non-enumerable members from own enumerable members. Runtime replacement
of such instances therefore cannot be inferred reliably: additive record members
are only guaranteed when those inputs are known to be plain records.
The inferred record merge, including additions and replacement value types.
Required base keys stay required; definitely defined patch keys become required. Other additions are optional because absent or undefined patch values are ignored. Nullish whole patches retain
Base, while null-valued properties replace their bases. Union patches retain the possible unchanged and merged results. Index signatures conservatively retain both base and patch possibilities.Dates, regular expressions, mutable and readonly maps and sets, callable types, and arrays are replacements. Other objects are modeled as ordinary records. TypeScript cannot distinguish custom-class instances from matching plain records, or inherited/non-enumerable members from own enumerable members. Runtime replacement of such instances therefore cannot be inferred reliably: additive record members are only guaranteed when those inputs are known to be plain records.