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.

    • 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

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

    Parameters

    • target: Function

      The function to call.

    • thisArgument: any

      The object to be used as the this object.

    • argumentsList: ArrayLike<any>

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

    Returns any