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.

interface OnCancelFunction {
    shouldReject: boolean;
    (cancelHandler: (() => void)): void;
}
  • Parameters

    • cancelHandler: (() => void)
        • (): void
        • Returns void

    Returns void

Properties

Properties

shouldReject: boolean