Library API
    Preparing search index...

    Function deepMerge

    • Recursively deeply merges multiple objects into a single new object. Does not mutate the source objects.

      Type Parameters

      • T extends Record<PropertyKey, any>

      Parameters

      • ...objects: Partial<T>[]

        The objects to merge

      Returns T

      A new deeply merged object

      const merged = deepMerge({ a: { x: 1 } }, { a: { y: 2 } }); // { a: { x: 1, y: 2 } }