Skip to content

merge

merge<T, U, R>(target, source, options?): R

Defined in: packages/core/src/object/merge.ts:53

Merge two values into a new one.

Shallow by default: a key present in both takes the source’s value whole. With recursive, two mergeable values are merged instead — see [“recursive”] for what that costs.

T

U

R

T

Value to merge into

U

Value to merge from

MergeOptions & object

Merge options

R

The merged value; target is not modified

merge<T, U, R>(target, source, options): R

Defined in: packages/core/src/object/merge.ts:58

Merge two values into a new one.

Shallow by default: a key present in both takes the source’s value whole. With recursive, two mergeable values are merged instead — see [“recursive”] for what that costs.

T

U

R

T

Value to merge into

U

Value to merge from

MergeOptions & object

Merge options

R

The merged value; target is not modified