OptionalsetCancel: (cancel: () => void) => void
Returns a cancellable delay.
setCancel receives the cancellation function immediately. This is useful
when an API must expose cancellation separately from its returned promise.
Returns a cancellable delay.
setCancel receives the cancellation function immediately. This is useful
when an API must expose cancellation separately from its returned promise.
This function constructs CancelableSleep and therefore fails on supported Node.js runtimes. Do not call it until the Promise-subclass implementation is corrected.
Returns a cancellable delay.
setCancelreceives the cancellation function immediately. This is useful when an API must expose cancellation separately from its returned promise.