mergeAllInplace
mergeAllInplace<
TTarget,TSources>(target,sources,options?):TTarget& { [KeyType in string | number | symbol]: UnionToIntersection<TSources[number]>[KeyType] }
Defined in: packages/core/src/object/merge-inplace.ts:83
Fold several sources into target, each merged over the one before it.
Options are resolved once for the whole fold, where a chain of binary mergeInplace calls resolves them per step.
Type Parameters
Section titled “Type Parameters”TTarget
Section titled “TTarget”TTarget
TSources
Section titled “TSources”TSources extends readonly unknown[]
Parameters
Section titled “Parameters”target
Section titled “target”TTarget
Value to merge into; modified when it is mergeable
sources
Section titled “sources”TSources
Values to merge, lowest priority first
options?
Section titled “options?”Merge options
Returns
Section titled “Returns”TTarget & { [KeyType in string | number | symbol]: UnionToIntersection<TSources[number]>[KeyType] }
target where it could be merged into, otherwise the last value
that replaced it