Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace Merge

Callable

  • Merge<T>(...objs: Array<RecursivePartial<T>>): T
  • Merge<T>(...objs: T[]): T
  • Merge<O>(...objs: O): O[number] & O[number]
  • Type parameters

    • T

    Parameters

    Returns T

  • Type parameters

    • T

    Parameters

    • Rest ...objs: T[]

    Returns T

  • Type parameters

    • O: any[]

    Parameters

    • Rest ...objs: O

    Returns O[number] & O[number]

Index

Functions

ADD

  • ADD(amt: number, maxValue?: number): Mergeable<number> & number
  • Parameters

    • amt: number
    • Default value maxValue: number = Infinity

    Returns Mergeable<number> & number

CONCAT

  • CONCAT(str: string): Mergeable<string> & string
  • Parameters

    • str: string

    Returns Mergeable<string> & string

DIVIDE

  • DIVIDE(amt: number): Mergeable<number> & number
  • Parameters

    • amt: number

    Returns Mergeable<number> & number

FUNCTION

  • FUNCTION<T>(mappingFunction: (value?: T) => T): Mergeable<T> & T
  • Applies the given mapping function to the existing value, replacing it with the result.

    Type parameters

    • T

    Parameters

    • mappingFunction: (value?: T) => T
        • (value?: T): T
        • Parameters

          • Optional value: T

          Returns T

    Returns Mergeable<T> & T

MERGE_ARRAY

  • Every value in the existing array is merged with the value in new array by index.

    Note: Tuples (created with Tuple()) use "MERGE_ARRAY" by default.

    Type parameters

    • A: any[]

    Parameters

    • Rest ...values: A

    Returns Mergeable<A>

MULTIPLY

  • MULTIPLY(amt: number): Mergeable<number> & number
  • Parameters

    • amt: number

    Returns Mergeable<number> & number

MULTIPLY_NON_ZERO

  • MULTIPLY_NON_ZERO(amt: number): Mergeable<number> & number
  • If the existing value is 0, uses the given amt. If else, uses existing * amt

    Parameters

    • amt: number

    Returns Mergeable<number> & number

PUSH

  • PUSH<T>(...values: T[]): Mergeable<T[]> & T[]
  • Note: "PUSH" is used by default for merging array values.

    Type parameters

    • T

    Parameters

    • Rest ...values: T[]

    Returns Mergeable<T[]> & T[]

REPLACE

  • Replaces the existing value with the given value.

    Type parameters

    • T

    Parameters

    • value: T

    Returns Mergeable<T> & T

SUBTRACT

  • SUBTRACT(amt: number, minValue?: number): Mergeable<number> & number
  • Parameters

    • amt: number
    • Default value minValue: number = -Infinity

    Returns Mergeable<number> & number

Generated using TypeDoc