The async callback to execute and make cancellable.
The cancellation token obtained from a support/Cancellable!Cancellable.
OptionalonCancel: ((reason: unknown) => void)On optional callback to trigger when the promise is about to be canceled.
A new promise that adds cancellation semantics to the original promise.
Executes an asynchronous callback that takes an
AbortSignaland makes it cancellable via the given cancel token. If the cancel token is never triggered, then the promise will resolve as normal. However, if the cancel token is triggered and the promise is not yet resolved, then it will be rejected with an instance of Cancellation.