Replaces the types of fields in T whose names appear in M, leaving the rest untouched.
Produces a flat object type (single mapped type, no Omit & {...} chain) so editor hover
displays the resulting properties directly.
Keys present in M but not in T are ignored — only fields that already exist on T
are overridden, so a shared override map can be reused across multiple source types.
undefined is re-added to the override when the original field allowed it, so optional
fields on generated proto types (e.g. peerId?: string | undefined) remain assignable
from undefined under exactOptionalPropertyTypes.
Replaces the types of fields in
Twhose names appear inM, leaving the rest untouched. Produces a flat object type (single mapped type, noOmit & {...}chain) so editor hover displays the resulting properties directly.Keys present in
Mbut not inTare ignored — only fields that already exist onTare overridden, so a shared override map can be reused across multiple source types.undefinedis re-added to the override when the original field allowed it, so optional fields on generated proto types (e.g.peerId?: string | undefined) remain assignable fromundefinedunderexactOptionalPropertyTypes.