MAIDR Documentation - v3.65.0
    Preparing search index...

    Function deepMerge

    • Deep-merges override into defaults, filling any keys that are present in defaults but absent from override. This ensures that newly added defaults are available even when the caller supplies a partial object that predates those keys (for example, an older settings object in localStorage).

      null override values are treated as absent and fall back to defaults.

      Arrays are replaced wholesale rather than recursed into. If a key holds an array, a supplied override array will overwrite the default array instead of being merged element-by-element.

      Type Parameters

      • T extends object

      Parameters

      • defaults: T
      • override: Partial<T>

      Returns T