@karmaniverous/entity-tools
    Preparing search index...

    Function updateItem

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

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

      Does not mutate item or update.

      Type Parameters

      • T extends object

      Parameters

      • item: T

        The item to update.

      • update: MakeUpdatable<T>

        A compatible item with properties to update.

      Returns T

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