Skip to main content

callBind

Calls the supplied function and binds the specified context.

Signature​

callBind<T>(fn: (...arguments: any[]) => T | void, context: {}, ...arguments: any[]): T | undefined

Parameters​

NameTypeOptionalDescription
fn(...arguments: any[]) => T | voidNoSpecifies the function to execute.
context{}NoContext to bind to.
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 succeeded.