Home > @skunkteam/types > InterfaceType > mergeWith
Create a new type by merging all properties of the given type into the properties of this type.
Signature:
mergeWith<OtherProps extends Properties, OtherType extends unknownRecord>(...args: [type: InterfaceType<OtherProps, OtherType>] | [name: string, type: InterfaceType<OtherProps, OtherType>] | [options: InterfaceMergeOptions, type: InterfaceType<OtherProps, OtherType>]): MergeType<Props, ResultType, OtherProps, OtherType>;
Parameter | Type | Description |
---|---|---|
args | [type: InterfaceType<OtherProps, OtherType>] | [name: string, type: InterfaceType<OtherProps, OtherType>] | [options: InterfaceMergeOptions, type: InterfaceType<OtherProps, OtherType>] |
Returns:
MergeType<Props, ResultType, OtherProps, OtherType>
Keys of the given (right hand side) type override keys of this type (left hand side). Any options such as strictMissingKeys
and custom names are inherited from the left hand side type, but custom parsers and validators are dropped.