Awaiting a canceled delay rejects with CancelError. Canceling a delay
after it has completed has no effect.
Remarks
Direct construction currently fails on supported Node.js runtimes because
this Promise subclass accesses instance state while the base Promise
constructor runs. Do not construct this class. Use a normal Promise timer
with Cancelable.guard until the implementation is corrected.
Represents a delay that the caller can cancel.
Awaiting a canceled delay rejects with CancelError. Canceling a delay after it has completed has no effect.
Remarks
Direct construction currently fails on supported Node.js runtimes because this Promise subclass accesses instance state while the base Promise constructor runs. Do not construct this class. Use a normal Promise timer with Cancelable.guard until the implementation is corrected.