Overload implementation.

The target object to copy properties to.

The source object(s) to copy properties from.

  • Copies property values from one or more source objects to a target object. Same as the ES2015 Object.assign method, with the following differences:

    • Performs the copying recursively.
    • Silently skips target properties that are not writable, instead of throwing an error.
    • Whenever any object in the target object graph has a method named "assignProperties", deepAssign() will invoke this method with the source data to copy instead of performing its normal copying behavior.

    Type Parameters

    • T
    • U

    Parameters

    • target: T

      The target object to copy properties to.

    • source: U

      The source object to copy properties from.

    Returns T & U

    The target object.

  • Copies property values from one or more source objects to a target object. Same as the ES2015 Object.assign method, with the following differences:

    • Performs the copying recursively.
    • Silently skips target properties that are not writable, instead of throwing an error.
    • Whenever any object in the target object graph has a method named "assignProperties", deepAssign() will invoke this method with the source data to copy instead of performing its normal copying behavior.

    Type Parameters

    • T
    • U
    • V

    Parameters

    • target: T

      The target object to copy properties to.

    • source1: U

      The first source object to copy properties from.

    • source2: V

      The second source object to copy properties from.

    Returns T & U & V

    The target object.

  • Copies property values from one or more source objects to a target object. Same as the ES2015 Object.assign method, with the following differences:

    • Performs the copying recursively.
    • Silently skips target properties that are not writable, instead of throwing an error.
    • Whenever any object in the target object graph has a method named "assignProperties", deepAssign() will invoke this method with the source data to copy instead of performing its normal copying behavior.

    Type Parameters

    • T
    • U
    • V
    • W

    Parameters

    • target: T

      The target object to copy properties to.

    • source1: U

      The first source object to copy properties from.

    • source2: V

      The second source object to copy properties from.

    • source3: W

      The third source object to copy properties from.

    Returns T & U & V & W

    The target object.