Skip to main content

schedulePromise

Calls the supplied function using a Promise.

Signature​

schedulePromise(
fn: ((...arguments: any[]) => void) | undefined,
...arguments: any[]
): number

Parameters​

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

Return value​

Returns the call handle. Can be used to cancel the call using cancelPromise or scheduleAndCancelPromise.