Skip to main content

call

Calls the supplied function.

Signature​

call<T>(fn: (...arguments: any[]) => T | void, ...arguments: any[]): T | undefined

Parameters​

NameTypeOptionalDescription
fn(...arguments: any[]) => T | voidNoSpecifies the function to execute.
argumentsany[]YesOptional arguments which should be passed to the callee.

Return value​

Returns undefined if the call fails or the return value of the function which is executed if the call succeeds.