Creates a shallow update of record with the properties of update according to the following conventions:

  • record and update must be compatible types.
  • undefined properties in update are ignored.
  • null properties in update are assigned to record.
  • All undefined and null properties in the resulting update are removed.

Does not mutate record or update.

  • Type Parameters

    • T extends object

    Parameters

    • record: T

      The record to update.

    • update: MakeUpdatable<T>

      A compatible record with properties to update.

    Returns T

    A shallow copy of record merged with the properties of update.