Function apply

  • Calls the function with the specified object as the this value and the elements of specified array as the arguments.

    Type Parameters

    • T
    • A extends readonly any[]
    • R

    Parameters

    • target: ((this: T, ...args: A) => R)

      The function to call.

        • (this, ...args): R
        • Parameters

          • this: T
          • Rest...args: A

          Returns R

    • thisArgument: T

      The object to be used as the this object.

    • argumentsList: Readonly<A>

      An array of argument values to be passed to the function.

    Returns R

  • Parameters

    Returns any