deadline<T>(): Promise<T>
Create a promise which will be rejected with DOMException
when
a given delay is exceeded.
Note: Prefer to use AbortSignal.timeout
instead for the APIs
that accept AbortSignal
.
ms: number
Duration in milliseconds for when the promise should time out.
optional
options: DeadlineOptions
Additional options.