Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "object/with-updated-values"

Index

Functions

Functions

withUpdatedValues

  • withUpdatedValues<T>(original: T, newValue: Partial<T>): T & {}
  • Returns a copy of the original (immutable) object updated with the new values, leveraging typescripts static typing capabilities to avoid assigning invalid properties.

    Type parameters

    • T

    Parameters

    • original: T

      The original item to copy.

    • newValue: Partial<T>

      The item with the updated properties.

    Returns T & {}

Generated using TypeDoc