The API reference is a Work in Progress and will be continuously improved and extended. We'd love to hear your feedback in our documentation repository.

Home > @edtr-io/ui > merge

merge() function

Creates a new object with the own properties of values merged with the own properties of fallback. If a key exists in both objects: and both values are objects, the two values will be recursively merged otherwise the value from the values object will be used.

Signature:
export declare function merge<T extends {}>(payload: MergePayload<T>): T

Parameters

ParameterTypeDescription
payloadMergePayload<T>An object containing fallback and values
Returns:

T

The merged object