Interface OnCancelFunction
interface OnCancelFunction { shouldReject: boolean; (cancelHandler: (() => void)): void; } - OnCancelFunction(cancelHandler): void
Parameters
- cancelHandler: (() => void)
Returns void
Properties
shouldReject
shouldReject: boolean
Accepts a function that is called when the promise is canceled.
You're not required to call this function. You can call this function multiple times to add multiple cancel handlers.