From 8139c3c5b058843fa8d8dfe89daafe5eac8d59a7 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Thu, 20 Jul 2023 13:10:31 -0700 Subject: [PATCH] Experiment: Convert Promise to Promise As suggested in microsoft/typescript-dom-lib-generator#1598 --- src/lib/dom.generated.d.ts | 124 +++++++++++----------- src/lib/dom.iterable.generated.d.ts | 2 +- src/lib/es2015.promise.d.ts | 2 +- src/lib/esnext.disposable.d.ts | 4 +- src/lib/webworker.generated.d.ts | 52 ++++----- src/lib/webworker.iterable.generated.d.ts | 2 +- 6 files changed, 93 insertions(+), 93 deletions(-) diff --git a/src/lib/dom.generated.d.ts b/src/lib/dom.generated.d.ts index 3088bc65e311b..420a1e7c42ef2 100644 --- a/src/lib/dom.generated.d.ts +++ b/src/lib/dom.generated.d.ts @@ -2640,7 +2640,7 @@ interface AudioContext extends BaseAudioContext { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioContext/outputLatency) */ readonly outputLatency: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioContext/close) */ - close(): Promise; + close(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioContext/createMediaElementSource) */ createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioContext/createMediaStreamDestination) */ @@ -2650,9 +2650,9 @@ interface AudioContext extends BaseAudioContext { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioContext/getOutputTimestamp) */ getOutputTimestamp(): AudioTimestamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioContext/resume) */ - resume(): Promise; + resume(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioContext/suspend) */ - suspend(): Promise; + suspend(): Promise; addEventListener(type: K, listener: (this: AudioContext, ev: BaseAudioContextEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: AudioContext, ev: BaseAudioContextEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -5209,9 +5209,9 @@ declare var CSSVariableReferenceValue: { */ interface Cache { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/add) */ - add(request: RequestInfo | URL): Promise; + add(request: RequestInfo | URL): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/addAll) */ - addAll(requests: RequestInfo[]): Promise; + addAll(requests: RequestInfo[]): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/delete) */ delete(request: RequestInfo | URL, options?: CacheQueryOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/keys) */ @@ -5221,7 +5221,7 @@ interface Cache { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/matchAll) */ matchAll(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise>; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/put) */ - put(request: RequestInfo | URL, response: Response): Promise; + put(request: RequestInfo | URL, response: Response): Promise; } declare var Cache: { @@ -5616,9 +5616,9 @@ interface Clipboard extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Clipboard/readText) */ readText(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Clipboard/write) */ - write(data: ClipboardItems): Promise; + write(data: ClipboardItems): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Clipboard/writeText) */ - writeText(data: string): Promise; + writeText(data: string): Promise; } declare var Clipboard: { @@ -5809,7 +5809,7 @@ interface CredentialsContainer { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CredentialsContainer/get) */ get(options?: CredentialRequestOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CredentialsContainer/preventSilentAccess) */ - preventSilentAccess(): Promise; + preventSilentAccess(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CredentialsContainer/store) */ store(credential: Credential): Promise; } @@ -7201,9 +7201,9 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/exitFullscreen) */ - exitFullscreen(): Promise; + exitFullscreen(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/exitPictureInPicture) */ - exitPictureInPicture(): Promise; + exitPictureInPicture(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/exitPointerLock) */ exitPointerLock(): void; /** @@ -7331,7 +7331,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve */ releaseEvents(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/requestStorageAccess) */ - requestStorageAccess(): Promise; + requestStorageAccess(): Promise; /** * Writes one or more HTML expressions to a document in the specified window. * @param content Specifies the text and HTML tags to write. @@ -7774,7 +7774,7 @@ interface Element extends Node, ARIAMixin, Animatable, ChildNode, InnerHTML, Non * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/requestFullscreen) */ - requestFullscreen(options?: FullscreenOptions): Promise; + requestFullscreen(options?: FullscreenOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/requestPointerLock) */ requestPointerLock(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/scroll) */ @@ -8371,7 +8371,7 @@ interface FileSystemDirectoryHandle extends FileSystemHandle { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle/getFileHandle) */ getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle/removeEntry) */ - removeEntry(name: string, options?: FileSystemRemoveOptions): Promise; + removeEntry(name: string, options?: FileSystemRemoveOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle/resolve) */ resolve(possibleDescendant: FileSystemHandle): Promise; } @@ -8468,11 +8468,11 @@ declare var FileSystemHandle: { */ interface FileSystemWritableFileStream extends WritableStream { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/seek) */ - seek(position: number): Promise; + seek(position: number): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/truncate) */ - truncate(size: number): Promise; + truncate(size: number): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/write) */ - write(data: FileSystemWriteChunkType): Promise; + write(data: FileSystemWriteChunkType): Promise; } declare var FileSystemWritableFileStream: { @@ -10902,7 +10902,7 @@ interface HTMLImageElement extends HTMLElement { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLImageElement/y) */ readonly y: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLImageElement/decode) */ - decode(): Promise; + decode(): Promise; addEventListener(type: K, listener: (this: HTMLImageElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLImageElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -11542,13 +11542,13 @@ interface HTMLMediaElement extends HTMLElement { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/play) */ - play(): Promise; + play(): Promise; /** * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/setMediaKeys) */ - setMediaKeys(mediaKeys: MediaKeys | null): Promise; + setMediaKeys(mediaKeys: MediaKeys | null): Promise; readonly NETWORK_EMPTY: 0; readonly NETWORK_IDLE: 1; readonly NETWORK_LOADING: 2; @@ -14928,15 +14928,15 @@ interface MediaKeySession extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaKeySession/sessionId) */ readonly sessionId: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaKeySession/close) */ - close(): Promise; + close(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaKeySession/generateRequest) */ - generateRequest(initDataType: string, initData: BufferSource): Promise; + generateRequest(initDataType: string, initData: BufferSource): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaKeySession/load) */ load(sessionId: string): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaKeySession/remove) */ - remove(): Promise; + remove(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaKeySession/update) */ - update(response: BufferSource): Promise; + update(response: BufferSource): Promise; addEventListener(type: K, listener: (this: MediaKeySession, ev: MediaKeySessionEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: MediaKeySession, ev: MediaKeySessionEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -15324,7 +15324,7 @@ interface MediaStreamTrack extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaStreamTrack/readyState) */ readonly readyState: MediaStreamTrackState; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaStreamTrack/applyConstraints) */ - applyConstraints(constraints?: MediaTrackConstraints): Promise; + applyConstraints(constraints?: MediaTrackConstraints): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaStreamTrack/clone) */ clone(): MediaStreamTrack; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaStreamTrack/getCapabilities) */ @@ -15812,13 +15812,13 @@ declare var NamedNodeMap: { */ interface NavigationPreloadManager { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/disable) */ - disable(): Promise; + disable(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/enable) */ - enable(): Promise; + enable(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/getState) */ getState(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/setHeaderValue) */ - setHeaderValue(value: string): Promise; + setHeaderValue(value: string): Promise; } declare var NavigationPreloadManager: { @@ -15898,7 +15898,7 @@ interface Navigator extends NavigatorAutomationInformation, NavigatorBadge, Navi * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/share) */ - share(data?: ShareData): Promise; + share(data?: ShareData): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/vibrate) */ vibrate(pattern: VibratePattern): boolean; } @@ -15916,9 +15916,9 @@ interface NavigatorAutomationInformation { /** Available only in secure contexts. */ interface NavigatorBadge { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/clearAppBadge) */ - clearAppBadge(): Promise; + clearAppBadge(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/setAppBadge) */ - setAppBadge(contents?: number): Promise; + setAppBadge(contents?: number): Promise; } interface NavigatorConcurrentHardware { @@ -16528,11 +16528,11 @@ interface OfflineAudioContext extends BaseAudioContext { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OfflineAudioContext/complete_event) */ oncomplete: ((this: OfflineAudioContext, ev: OfflineAudioCompletionEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OfflineAudioContext/resume) */ - resume(): Promise; + resume(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OfflineAudioContext/startRendering) */ startRendering(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OfflineAudioContext/suspend) */ - suspend(suspendTime: number): Promise; + suspend(suspendTime: number): Promise; addEventListener(type: K, listener: (this: OfflineAudioContext, ev: OfflineAudioContextEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: OfflineAudioContext, ev: OfflineAudioContextEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -16859,7 +16859,7 @@ interface PaymentRequest extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/paymentmethodchange_event) */ onpaymentmethodchange: ((this: PaymentRequest, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/abort) */ - abort(): Promise; + abort(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/canMakePayment) */ canMakePayment(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/show) */ @@ -16905,9 +16905,9 @@ interface PaymentResponse extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/requestId) */ readonly requestId: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/complete) */ - complete(result?: PaymentComplete): Promise; + complete(result?: PaymentComplete): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/retry) */ - retry(errorFields?: PaymentValidationErrors): Promise; + retry(errorFields?: PaymentValidationErrors): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/toJSON) */ toJSON(): any; } @@ -18107,9 +18107,9 @@ interface RTCPeerConnection extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/signalingState) */ readonly signalingState: RTCSignalingState; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/addIceCandidate) */ - addIceCandidate(candidate?: RTCIceCandidateInit): Promise; + addIceCandidate(candidate?: RTCIceCandidateInit): Promise; /** @deprecated */ - addIceCandidate(candidate: RTCIceCandidateInit, successCallback: VoidFunction, failureCallback: RTCPeerConnectionErrorCallback): Promise; + addIceCandidate(candidate: RTCIceCandidateInit, successCallback: VoidFunction, failureCallback: RTCPeerConnectionErrorCallback): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/addTrack) */ addTrack(track: MediaStreamTrack, ...streams: MediaStream[]): RTCRtpSender; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/addTransceiver) */ @@ -18119,13 +18119,13 @@ interface RTCPeerConnection extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/createAnswer) */ createAnswer(options?: RTCAnswerOptions): Promise; /** @deprecated */ - createAnswer(successCallback: RTCSessionDescriptionCallback, failureCallback: RTCPeerConnectionErrorCallback): Promise; + createAnswer(successCallback: RTCSessionDescriptionCallback, failureCallback: RTCPeerConnectionErrorCallback): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/createDataChannel) */ createDataChannel(label: string, dataChannelDict?: RTCDataChannelInit): RTCDataChannel; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/createOffer) */ createOffer(options?: RTCOfferOptions): Promise; /** @deprecated */ - createOffer(successCallback: RTCSessionDescriptionCallback, failureCallback: RTCPeerConnectionErrorCallback, options?: RTCOfferOptions): Promise; + createOffer(successCallback: RTCSessionDescriptionCallback, failureCallback: RTCPeerConnectionErrorCallback, options?: RTCOfferOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/getConfiguration) */ getConfiguration(): RTCConfiguration; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/getReceivers) */ @@ -18143,13 +18143,13 @@ interface RTCPeerConnection extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/setConfiguration) */ setConfiguration(configuration?: RTCConfiguration): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/setLocalDescription) */ - setLocalDescription(description?: RTCLocalSessionDescriptionInit): Promise; + setLocalDescription(description?: RTCLocalSessionDescriptionInit): Promise; /** @deprecated */ - setLocalDescription(description: RTCLocalSessionDescriptionInit, successCallback: VoidFunction, failureCallback: RTCPeerConnectionErrorCallback): Promise; + setLocalDescription(description: RTCLocalSessionDescriptionInit, successCallback: VoidFunction, failureCallback: RTCPeerConnectionErrorCallback): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/setRemoteDescription) */ - setRemoteDescription(description: RTCSessionDescriptionInit): Promise; + setRemoteDescription(description: RTCSessionDescriptionInit): Promise; /** @deprecated */ - setRemoteDescription(description: RTCSessionDescriptionInit, successCallback: VoidFunction, failureCallback: RTCPeerConnectionErrorCallback): Promise; + setRemoteDescription(description: RTCSessionDescriptionInit, successCallback: VoidFunction, failureCallback: RTCPeerConnectionErrorCallback): Promise; addEventListener(type: K, listener: (this: RTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: RTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -18240,9 +18240,9 @@ interface RTCRtpSender { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpSender/getStats) */ getStats(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpSender/replaceTrack) */ - replaceTrack(withTrack: MediaStreamTrack | null): Promise; + replaceTrack(withTrack: MediaStreamTrack | null): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpSender/setParameters) */ - setParameters(parameters: RTCRtpSendParameters): Promise; + setParameters(parameters: RTCRtpSendParameters): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpSender/setStreams) */ setStreams(...streams: MediaStream[]): void; } @@ -18470,7 +18470,7 @@ interface ReadableStream { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */ readonly locked: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */ - cancel(reason?: any): Promise; + cancel(reason?: any): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */ getReader(options: { mode: "byob" }): ReadableStreamBYOBReader; getReader(): ReadableStreamDefaultReader; @@ -18478,7 +18478,7 @@ interface ReadableStream { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough) */ pipeThrough(transform: ReadableWritablePair, options?: StreamPipeOptions): ReadableStream; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo) */ - pipeTo(destination: WritableStream, options?: StreamPipeOptions): Promise; + pipeTo(destination: WritableStream, options?: StreamPipeOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */ tee(): [ReadableStream, ReadableStream]; } @@ -18552,7 +18552,7 @@ interface ReadableStreamGenericReader { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/closed) */ readonly closed: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/cancel) */ - cancel(reason?: any): Promise; + cancel(reason?: any): Promise; } interface RemotePlaybackEventMap { @@ -18572,9 +18572,9 @@ interface RemotePlayback extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RemotePlayback/state) */ readonly state: RemotePlaybackState; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RemotePlayback/cancelWatchAvailability) */ - cancelWatchAvailability(id?: number): Promise; + cancelWatchAvailability(id?: number): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RemotePlayback/prompt) */ - prompt(): Promise; + prompt(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RemotePlayback/watchAvailability) */ watchAvailability(callback: RemotePlaybackAvailabilityCallback): Promise; addEventListener(type: K, listener: (this: RemotePlayback, ev: RemotePlaybackEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -21209,11 +21209,11 @@ interface ServiceWorkerRegistration extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/getNotifications) */ getNotifications(filter?: GetNotificationOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/showNotification) */ - showNotification(title: string, options?: NotificationOptions): Promise; + showNotification(title: string, options?: NotificationOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/unregister) */ unregister(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/update) */ - update(): Promise; + update(): Promise; addEventListener(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -22752,7 +22752,7 @@ interface VideoDecoder extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoDecoder/decode) */ decode(chunk: EncodedVideoChunk): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoDecoder/flush) */ - flush(): Promise; + flush(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoDecoder/reset) */ reset(): void; addEventListener(type: K, listener: (this: VideoDecoder, ev: VideoDecoderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -22788,7 +22788,7 @@ interface VideoEncoder extends EventTarget { configure(config: VideoEncoderConfig): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoEncoder/encode) */ encode(frame: VideoFrame, options?: VideoEncoderEncodeOptions): void; - flush(): Promise; + flush(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoEncoder/reset) */ reset(): void; addEventListener(type: K, listener: (this: VideoEncoder, ev: VideoEncoderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -23106,7 +23106,7 @@ interface WakeLockSentinel extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WakeLockSentinel/type) */ readonly type: WakeLockType; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WakeLockSentinel/release) */ - release(): Promise; + release(): Promise; addEventListener(type: K, listener: (this: WakeLockSentinel, ev: WakeLockSentinelEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: WakeLockSentinel, ev: WakeLockSentinelEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -25986,7 +25986,7 @@ interface Worklet { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Worklet/addModule) */ - addModule(moduleURL: string | URL, options?: WorkletOptions): Promise; + addModule(moduleURL: string | URL, options?: WorkletOptions): Promise; } declare var Worklet: { @@ -26003,9 +26003,9 @@ interface WritableStream { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) */ readonly locked: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */ - abort(reason?: any): Promise; + abort(reason?: any): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) */ - close(): Promise; + close(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) */ getWriter(): WritableStreamDefaultWriter; } @@ -26045,13 +26045,13 @@ interface WritableStreamDefaultWriter { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */ readonly ready: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */ - abort(reason?: any): Promise; + abort(reason?: any): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */ - close(): Promise; + close(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock) */ releaseLock(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write) */ - write(chunk?: W): Promise; + write(chunk?: W): Promise; } declare var WritableStreamDefaultWriter: { diff --git a/src/lib/dom.iterable.generated.d.ts b/src/lib/dom.iterable.generated.d.ts index 45fb1eac67c2c..ffe824f1cdf34 100644 --- a/src/lib/dom.iterable.generated.d.ts +++ b/src/lib/dom.iterable.generated.d.ts @@ -52,7 +52,7 @@ interface CSSUnparsedValue { interface Cache { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/addAll) */ - addAll(requests: Iterable): Promise; + addAll(requests: Iterable): Promise; } interface CanvasPath { diff --git a/src/lib/es2015.promise.d.ts b/src/lib/es2015.promise.d.ts index 68b476d8c2fc6..cae700d7e26b5 100644 --- a/src/lib/es2015.promise.d.ts +++ b/src/lib/es2015.promise.d.ts @@ -45,7 +45,7 @@ interface PromiseConstructor { * Creates a new resolved promise. * @returns A resolved promise. */ - resolve(): Promise; + resolve(): Promise; /** * Creates a new resolved promise for the provided value. * @param value A promise. diff --git a/src/lib/esnext.disposable.d.ts b/src/lib/esnext.disposable.d.ts index 318b7395ac28a..0c4d3c16001dd 100644 --- a/src/lib/esnext.disposable.d.ts +++ b/src/lib/esnext.disposable.d.ts @@ -107,7 +107,7 @@ interface AsyncDisposableStack { /** * Disposes each resource in the stack in the reverse order that they were added. */ - disposeAsync(): Promise; + disposeAsync(): Promise; /** * Adds a disposable resource to the stack, returning the resource. * @param value The resource to add. `null` and `undefined` will not be added, but will be returned. @@ -156,7 +156,7 @@ interface AsyncDisposableStack { * ``` */ move(): AsyncDisposableStack; - [Symbol.asyncDispose](): Promise; + [Symbol.asyncDispose](): Promise; readonly [Symbol.toStringTag]: string; } diff --git a/src/lib/webworker.generated.d.ts b/src/lib/webworker.generated.d.ts index db20199b6724f..b1dfec2d6de76 100644 --- a/src/lib/webworker.generated.d.ts +++ b/src/lib/webworker.generated.d.ts @@ -1423,9 +1423,9 @@ declare var CSSVariableReferenceValue: { */ interface Cache { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/add) */ - add(request: RequestInfo | URL): Promise; + add(request: RequestInfo | URL): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/addAll) */ - addAll(requests: RequestInfo[]): Promise; + addAll(requests: RequestInfo[]): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/delete) */ delete(request: RequestInfo | URL, options?: CacheQueryOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/keys) */ @@ -1435,7 +1435,7 @@ interface Cache { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/matchAll) */ matchAll(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise>; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/put) */ - put(request: RequestInfo | URL, response: Response): Promise; + put(request: RequestInfo | URL, response: Response): Promise; } declare var Cache: { @@ -1719,7 +1719,7 @@ declare var Client: { */ interface Clients { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Clients/claim) */ - claim(): Promise; + claim(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Clients/get) */ get(id: string): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Clients/matchAll) */ @@ -2825,7 +2825,7 @@ interface FileSystemDirectoryHandle extends FileSystemHandle { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle/getFileHandle) */ getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle/removeEntry) */ - removeEntry(name: string, options?: FileSystemRemoveOptions): Promise; + removeEntry(name: string, options?: FileSystemRemoveOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle/resolve) */ resolve(possibleDescendant: FileSystemHandle): Promise; } @@ -2906,11 +2906,11 @@ declare var FileSystemSyncAccessHandle: { */ interface FileSystemWritableFileStream extends WritableStream { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/seek) */ - seek(position: number): Promise; + seek(position: number): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/truncate) */ - truncate(size: number): Promise; + truncate(size: number): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/write) */ - write(data: FileSystemWriteChunkType): Promise; + write(data: FileSystemWriteChunkType): Promise; } declare var FileSystemWritableFileStream: { @@ -4005,13 +4005,13 @@ declare var MessagePort: { */ interface NavigationPreloadManager { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/disable) */ - disable(): Promise; + disable(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/enable) */ - enable(): Promise; + enable(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/getState) */ getState(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/setHeaderValue) */ - setHeaderValue(value: string): Promise; + setHeaderValue(value: string): Promise; } declare var NavigationPreloadManager: { @@ -4022,9 +4022,9 @@ declare var NavigationPreloadManager: { /** Available only in secure contexts. */ interface NavigatorBadge { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/clearAppBadge) */ - clearAppBadge(): Promise; + clearAppBadge(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/setAppBadge) */ - setAppBadge(contents?: number): Promise; + setAppBadge(contents?: number): Promise; } interface NavigatorConcurrentHardware { @@ -4771,7 +4771,7 @@ interface ReadableStream { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */ readonly locked: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */ - cancel(reason?: any): Promise; + cancel(reason?: any): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */ getReader(options: { mode: "byob" }): ReadableStreamBYOBReader; getReader(): ReadableStreamDefaultReader; @@ -4779,7 +4779,7 @@ interface ReadableStream { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough) */ pipeThrough(transform: ReadableWritablePair, options?: StreamPipeOptions): ReadableStream; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo) */ - pipeTo(destination: WritableStream, options?: StreamPipeOptions): Promise; + pipeTo(destination: WritableStream, options?: StreamPipeOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */ tee(): [ReadableStream, ReadableStream]; } @@ -4853,7 +4853,7 @@ interface ReadableStreamGenericReader { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/closed) */ readonly closed: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/cancel) */ - cancel(reason?: any): Promise; + cancel(reason?: any): Promise; } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report) */ @@ -5176,7 +5176,7 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope { readonly registration: ServiceWorkerRegistration; readonly serviceWorker: ServiceWorker; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/skipWaiting) */ - skipWaiting(): Promise; + skipWaiting(): Promise; addEventListener(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -5218,11 +5218,11 @@ interface ServiceWorkerRegistration extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/getNotifications) */ getNotifications(filter?: GetNotificationOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/showNotification) */ - showNotification(title: string, options?: NotificationOptions): Promise; + showNotification(title: string, options?: NotificationOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/unregister) */ unregister(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/update) */ - update(): Promise; + update(): Promise; addEventListener(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -5674,7 +5674,7 @@ interface VideoDecoder extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoDecoder/decode) */ decode(chunk: EncodedVideoChunk): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoDecoder/flush) */ - flush(): Promise; + flush(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoDecoder/reset) */ reset(): void; addEventListener(type: K, listener: (this: VideoDecoder, ev: VideoDecoderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -5710,7 +5710,7 @@ interface VideoEncoder extends EventTarget { configure(config: VideoEncoderConfig): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoEncoder/encode) */ encode(frame: VideoFrame, options?: VideoEncoderEncodeOptions): void; - flush(): Promise; + flush(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoEncoder/reset) */ reset(): void; addEventListener(type: K, listener: (this: VideoEncoder, ev: VideoEncoderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -8527,9 +8527,9 @@ interface WritableStream { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) */ readonly locked: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */ - abort(reason?: any): Promise; + abort(reason?: any): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) */ - close(): Promise; + close(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) */ getWriter(): WritableStreamDefaultWriter; } @@ -8569,13 +8569,13 @@ interface WritableStreamDefaultWriter { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */ readonly ready: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */ - abort(reason?: any): Promise; + abort(reason?: any): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */ - close(): Promise; + close(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock) */ releaseLock(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write) */ - write(chunk?: W): Promise; + write(chunk?: W): Promise; } declare var WritableStreamDefaultWriter: { diff --git a/src/lib/webworker.iterable.generated.d.ts b/src/lib/webworker.iterable.generated.d.ts index 95f733c1b600e..0dd0ca77c6bf3 100644 --- a/src/lib/webworker.iterable.generated.d.ts +++ b/src/lib/webworker.iterable.generated.d.ts @@ -25,7 +25,7 @@ interface CSSUnparsedValue { interface Cache { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/addAll) */ - addAll(requests: Iterable): Promise; + addAll(requests: Iterable): Promise; } interface CanvasPath {