Function construct

  • Constructs the target with the elements of specified array as the arguments and the specified constructor as the new.target value.

    Type Parameters

    • A extends readonly any[]
    • R

    Parameters

    • target: (new (...args: A) => R)

      The constructor to invoke.

        • new (...args): R
        • Parameters

          • Rest...args: A

          Returns R

    • argumentsList: Readonly<A>

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

    • OptionalnewTarget: (new (...args: any) => any)

      The constructor to be used as the new.target object.

        • new (...args): any
        • Parameters

          • Rest...args: any

          Returns any

    Returns R

  • Parameters

    Returns any