Skip to content

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.

TTarget

TSources extends readonly unknown[]

TTarget

Value to merge into; modified when it is mergeable

TSources

Values to merge, lowest priority first

MergeOptions

Merge options

TTarget & { [KeyType in string | number | symbol]: UnionToIntersection<TSources[number]>[KeyType] }

target where it could be merged into, otherwise the last value that replaced it