Skip to content

Commit 6a58a0e

Browse files
saschanazsandersn
authored andcommitted
remove redundant fetch declarations (#691)
1 parent aa42b9b commit 6a58a0e

3 files changed

Lines changed: 11 additions & 13 deletions

File tree

baselines/dom.generated.d.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5908,10 +5908,6 @@ interface GlobalEventHandlers {
59085908
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
59095909
}
59105910

5911-
interface GlobalFetch {
5912-
fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
5913-
}
5914-
59155911
interface HTMLAllCollection {
59165912
/**
59175913
* Returns the number of elements in the collection.
@@ -17259,7 +17255,7 @@ interface WindowEventMap extends GlobalEventHandlersEventMap, WindowEventHandler
1725917255
}
1726017256

1726117257
/** A window containing a DOM document; the document property points to the DOM document loaded in that window. */
17262-
interface Window extends EventTarget, WindowTimers, WindowSessionStorage, WindowLocalStorage, WindowConsole, GlobalEventHandlers, IDBEnvironment, WindowBase64, GlobalFetch, WindowOrWorkerGlobalScope, WindowEventHandlers {
17258+
interface Window extends EventTarget, WindowTimers, WindowSessionStorage, WindowLocalStorage, WindowConsole, GlobalEventHandlers, IDBEnvironment, WindowBase64, WindowOrWorkerGlobalScope, WindowEventHandlers {
1726317259
Blob: typeof Blob;
1726417260
TextDecoder: typeof TextDecoder;
1726517261
TextEncoder: typeof TextEncoder;
@@ -18661,7 +18657,6 @@ declare var onwheel: ((this: Window, ev: WheelEvent) => any) | null;
1866118657
declare var indexedDB: IDBFactory;
1866218658
declare function atob(encodedString: string): string;
1866318659
declare function btoa(rawString: string): string;
18664-
declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
1866518660
declare var caches: CacheStorage;
1866618661
declare var crypto: Crypto;
1866718662
declare var indexedDB: IDBFactory;

baselines/webworker.generated.d.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,10 +1617,6 @@ interface GenericTransformStream {
16171617
readonly writable: WritableStream;
16181618
}
16191619

1620-
interface GlobalFetch {
1621-
fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
1622-
}
1623-
16241620
/** This Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing. A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs.  You can add to this using methods like append() (see Examples.) In all methods of this interface, header names are matched by case-insensitive byte sequence. */
16251621
interface Headers {
16261622
append(name: string, value: string): void;
@@ -4318,7 +4314,7 @@ interface WorkerGlobalScopeEventMap {
43184314
}
43194315

43204316
/** This Web Workers API interface is an interface representing the scope of any worker. Workers have no browsing context; this scope contains the information usually conveyed by Window objects — in this case event handlers, the console or the associated WorkerNavigator object. Each WorkerGlobalScope has its own event loop. */
4321-
interface WorkerGlobalScope extends EventTarget, WorkerUtils, WindowConsole, GlobalFetch, WindowOrWorkerGlobalScope {
4317+
interface WorkerGlobalScope extends EventTarget, WorkerUtils, WindowConsole, WindowOrWorkerGlobalScope {
43224318
readonly caches: CacheStorage;
43234319
readonly isSecureContext: boolean;
43244320
readonly location: WorkerLocation;
@@ -4722,7 +4718,6 @@ declare function importScripts(...urls: string[]): void;
47224718
declare function atob(encodedString: string): string;
47234719
declare function btoa(rawString: string): string;
47244720
declare var console: Console;
4725-
declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
47264721
declare var caches: CacheStorage;
47274722
declare var crypto: Crypto;
47284723
declare var indexedDB: IDBFactory;

inputfiles/removedTypes.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,10 @@
238238
"ontouchmove": null,
239239
"ontouchstart": null
240240
}
241-
}
241+
},
242+
"implements": [
243+
"GlobalFetch"
244+
]
242245
},
243246
"WheelEvent": {
244247
"properties": {
@@ -249,6 +252,11 @@
249252
}
250253
}
251254
},
255+
"WorkerGlobalScope": {
256+
"implements": [
257+
"GlobalFetch"
258+
]
259+
},
252260
"XPathEvaluator": {
253261
"methods": {
254262
"method": {

0 commit comments

Comments
 (0)