From 75d2528a13f357ea3cdd42a97f074efb1e104ca5 Mon Sep 17 00:00:00 2001 From: Adam Naji <110662505+Bashamega@users.noreply.github.com> Date: Sat, 3 Oct 2026 07:26:25 +0300 Subject: [PATCH] =?UTF-8?q?Revert=20"Update=20URL=20&=20Request=20&=20XMLH?= =?UTF-8?q?ttpRequest=20interface=20to=20accept=20Location=20(#=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 0082b1ba1ba23219ab86f969a4f8830ee4d8edc0. --- baselines/dom.generated.d.ts | 16 ++++---- baselines/serviceworker.generated.d.ts | 12 +++--- baselines/sharedworker.generated.d.ts | 16 ++++---- baselines/ts5.5/dom.generated.d.ts | 16 ++++---- baselines/ts5.5/serviceworker.generated.d.ts | 12 +++--- baselines/ts5.5/sharedworker.generated.d.ts | 16 ++++---- baselines/ts5.5/webworker.generated.d.ts | 16 ++++---- baselines/ts5.6/dom.generated.d.ts | 16 ++++---- baselines/ts5.6/serviceworker.generated.d.ts | 12 +++--- baselines/ts5.6/sharedworker.generated.d.ts | 16 ++++---- baselines/ts5.6/webworker.generated.d.ts | 16 ++++---- baselines/ts5.9/dom.generated.d.ts | 16 ++++---- baselines/ts5.9/serviceworker.generated.d.ts | 12 +++--- baselines/ts5.9/sharedworker.generated.d.ts | 16 ++++---- baselines/ts5.9/webworker.generated.d.ts | 16 ++++---- baselines/webworker.generated.d.ts | 16 ++++---- inputfiles/overridingTypes.jsonc | 42 ++++++++++++++++++++ inputfiles/patches/fetch.kdl | 8 ---- inputfiles/patches/html.kdl | 8 ---- inputfiles/patches/url.kdl | 27 ------------- inputfiles/patches/xhr.kdl | 12 ------ src/build/expose.ts | 39 ++---------------- 22 files changed, 166 insertions(+), 210 deletions(-) delete mode 100644 inputfiles/patches/xhr.kdl diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index f3b5e3c02..f543d0f63 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -31227,7 +31227,7 @@ interface Request extends Body { declare var Request: { prototype: Request; - new(input: RequestInfo | Location | URL, init?: RequestInit): Request; + new(input: RequestInfo | URL, init?: RequestInit): Request; }; /** @@ -38143,13 +38143,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | Location | URL, base?: string | URL | Location): URL; + new(url: string | URL, base?: string | URL): URL; /** * The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ - canParse(url: string | Location | URL, base?: string | URL | Location): boolean; + canParse(url: string | URL, base?: string | URL): boolean; /** * The **`createObjectURL()`** static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter. * @@ -38161,7 +38161,7 @@ declare var URL: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */ - parse(url: string | Location | URL, base?: string | URL | Location): URL | null; + parse(url: string | URL, base?: string | URL): URL | null; /** * The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL(). * @@ -42567,7 +42567,7 @@ interface WindowOrWorkerGlobalScope { createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ - fetch(input: RequestInfo | Location | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ @@ -42873,8 +42873,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/open) */ - open(method: string, url: string | Location | URL): void; - open(method: string, url: string | Location | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL): void; + open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; /** * The XMLHttpRequest method **`overrideMimeType()`** specifies a MIME type other than the one provided by the server to be used instead when interpreting the data being transferred in a request. * @@ -45005,7 +45005,7 @@ declare function clearTimeout(id: number | undefined): void; declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ -declare function fetch(input: RequestInfo | Location | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ declare function queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ diff --git a/baselines/serviceworker.generated.d.ts b/baselines/serviceworker.generated.d.ts index fd87652cd..190881a28 100644 --- a/baselines/serviceworker.generated.d.ts +++ b/baselines/serviceworker.generated.d.ts @@ -8465,7 +8465,7 @@ interface Request extends Body { declare var Request: { prototype: Request; - new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; + new(input: RequestInfo | URL, init?: RequestInit): Request; }; /** @@ -9517,19 +9517,19 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL; + new(url: string | URL, base?: string | URL): URL; /** * The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ - canParse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): boolean; + canParse(url: string | URL, base?: string | URL): boolean; /** * The **`URL.parse()`** static method of the URL interface returns a newly created URL object representing the URL defined by the parameters. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */ - parse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL | null; + parse(url: string | URL, base?: string | URL): URL | null; }; /** @@ -12577,7 +12577,7 @@ interface WindowOrWorkerGlobalScope { createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ - fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ @@ -13529,7 +13529,7 @@ declare function clearTimeout(id: number | undefined): void; declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ -declare function fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ declare function queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ diff --git a/baselines/sharedworker.generated.d.ts b/baselines/sharedworker.generated.d.ts index 7aa724ad6..602f794ec 100644 --- a/baselines/sharedworker.generated.d.ts +++ b/baselines/sharedworker.generated.d.ts @@ -8048,7 +8048,7 @@ interface Request extends Body { declare var Request: { prototype: Request; - new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; + new(input: RequestInfo | URL, init?: RequestInit): Request; }; /** @@ -9048,13 +9048,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL; + new(url: string | URL, base?: string | URL): URL; /** * The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ - canParse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): boolean; + canParse(url: string | URL, base?: string | URL): boolean; /** * The **`createObjectURL()`** static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter. * @@ -9066,7 +9066,7 @@ declare var URL: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */ - parse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL | null; + parse(url: string | URL, base?: string | URL): URL | null; /** * The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL(). * @@ -12083,7 +12083,7 @@ interface WindowOrWorkerGlobalScope { createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ - fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ @@ -12503,8 +12503,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/open) */ - open(method: string, url: string | WorkerLocation | URL): void; - open(method: string, url: string | WorkerLocation | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL): void; + open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; /** * The XMLHttpRequest method **`overrideMimeType()`** specifies a MIME type other than the one provided by the server to be used instead when interpreting the data being transferred in a request. * @@ -13219,7 +13219,7 @@ declare function clearTimeout(id: number | undefined): void; declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ -declare function fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ declare function queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ diff --git a/baselines/ts5.5/dom.generated.d.ts b/baselines/ts5.5/dom.generated.d.ts index aef6f6750..2594d311f 100644 --- a/baselines/ts5.5/dom.generated.d.ts +++ b/baselines/ts5.5/dom.generated.d.ts @@ -31203,7 +31203,7 @@ interface Request extends Body { declare var Request: { prototype: Request; - new(input: RequestInfo | Location | URL, init?: RequestInit): Request; + new(input: RequestInfo | URL, init?: RequestInit): Request; }; /** @@ -38117,13 +38117,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | Location | URL, base?: string | URL | Location): URL; + new(url: string | URL, base?: string | URL): URL; /** * The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ - canParse(url: string | Location | URL, base?: string | URL | Location): boolean; + canParse(url: string | URL, base?: string | URL): boolean; /** * The **`createObjectURL()`** static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter. * @@ -38135,7 +38135,7 @@ declare var URL: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */ - parse(url: string | Location | URL, base?: string | URL | Location): URL | null; + parse(url: string | URL, base?: string | URL): URL | null; /** * The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL(). * @@ -42541,7 +42541,7 @@ interface WindowOrWorkerGlobalScope { createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ - fetch(input: RequestInfo | Location | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ @@ -42847,8 +42847,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/open) */ - open(method: string, url: string | Location | URL): void; - open(method: string, url: string | Location | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL): void; + open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; /** * The XMLHttpRequest method **`overrideMimeType()`** specifies a MIME type other than the one provided by the server to be used instead when interpreting the data being transferred in a request. * @@ -44979,7 +44979,7 @@ declare function clearTimeout(id: number | undefined): void; declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ -declare function fetch(input: RequestInfo | Location | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ declare function queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ diff --git a/baselines/ts5.5/serviceworker.generated.d.ts b/baselines/ts5.5/serviceworker.generated.d.ts index e7aa90dc7..afc9c9702 100644 --- a/baselines/ts5.5/serviceworker.generated.d.ts +++ b/baselines/ts5.5/serviceworker.generated.d.ts @@ -8462,7 +8462,7 @@ interface Request extends Body { declare var Request: { prototype: Request; - new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; + new(input: RequestInfo | URL, init?: RequestInit): Request; }; /** @@ -9514,19 +9514,19 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL; + new(url: string | URL, base?: string | URL): URL; /** * The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ - canParse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): boolean; + canParse(url: string | URL, base?: string | URL): boolean; /** * The **`URL.parse()`** static method of the URL interface returns a newly created URL object representing the URL defined by the parameters. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */ - parse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL | null; + parse(url: string | URL, base?: string | URL): URL | null; }; /** @@ -12574,7 +12574,7 @@ interface WindowOrWorkerGlobalScope { createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ - fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ @@ -13526,7 +13526,7 @@ declare function clearTimeout(id: number | undefined): void; declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ -declare function fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ declare function queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ diff --git a/baselines/ts5.5/sharedworker.generated.d.ts b/baselines/ts5.5/sharedworker.generated.d.ts index ad5d84c20..272a4fc47 100644 --- a/baselines/ts5.5/sharedworker.generated.d.ts +++ b/baselines/ts5.5/sharedworker.generated.d.ts @@ -8045,7 +8045,7 @@ interface Request extends Body { declare var Request: { prototype: Request; - new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; + new(input: RequestInfo | URL, init?: RequestInit): Request; }; /** @@ -9045,13 +9045,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL; + new(url: string | URL, base?: string | URL): URL; /** * The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ - canParse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): boolean; + canParse(url: string | URL, base?: string | URL): boolean; /** * The **`createObjectURL()`** static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter. * @@ -9063,7 +9063,7 @@ declare var URL: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */ - parse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL | null; + parse(url: string | URL, base?: string | URL): URL | null; /** * The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL(). * @@ -12080,7 +12080,7 @@ interface WindowOrWorkerGlobalScope { createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ - fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ @@ -12500,8 +12500,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/open) */ - open(method: string, url: string | WorkerLocation | URL): void; - open(method: string, url: string | WorkerLocation | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL): void; + open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; /** * The XMLHttpRequest method **`overrideMimeType()`** specifies a MIME type other than the one provided by the server to be used instead when interpreting the data being transferred in a request. * @@ -13216,7 +13216,7 @@ declare function clearTimeout(id: number | undefined): void; declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ -declare function fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ declare function queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ diff --git a/baselines/ts5.5/webworker.generated.d.ts b/baselines/ts5.5/webworker.generated.d.ts index f06292a87..e74ca3fe4 100644 --- a/baselines/ts5.5/webworker.generated.d.ts +++ b/baselines/ts5.5/webworker.generated.d.ts @@ -9613,7 +9613,7 @@ interface Request extends Body { declare var Request: { prototype: Request; - new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; + new(input: RequestInfo | URL, init?: RequestInit): Request; }; /** @@ -10801,13 +10801,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL; + new(url: string | URL, base?: string | URL): URL; /** * The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ - canParse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): boolean; + canParse(url: string | URL, base?: string | URL): boolean; /** * The **`createObjectURL()`** static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter. * @@ -10819,7 +10819,7 @@ declare var URL: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */ - parse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL | null; + parse(url: string | URL, base?: string | URL): URL | null; /** * The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL(). * @@ -14158,7 +14158,7 @@ interface WindowOrWorkerGlobalScope { createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ - fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ @@ -14584,8 +14584,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/open) */ - open(method: string, url: string | WorkerLocation | URL): void; - open(method: string, url: string | WorkerLocation | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL): void; + open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; /** * The XMLHttpRequest method **`overrideMimeType()`** specifies a MIME type other than the one provided by the server to be used instead when interpreting the data being transferred in a request. * @@ -15331,7 +15331,7 @@ declare function clearTimeout(id: number | undefined): void; declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ -declare function fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ declare function queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ diff --git a/baselines/ts5.6/dom.generated.d.ts b/baselines/ts5.6/dom.generated.d.ts index 3138a8b64..a9f3c2fc4 100644 --- a/baselines/ts5.6/dom.generated.d.ts +++ b/baselines/ts5.6/dom.generated.d.ts @@ -31224,7 +31224,7 @@ interface Request extends Body { declare var Request: { prototype: Request; - new(input: RequestInfo | Location | URL, init?: RequestInit): Request; + new(input: RequestInfo | URL, init?: RequestInit): Request; }; /** @@ -38140,13 +38140,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | Location | URL, base?: string | URL | Location): URL; + new(url: string | URL, base?: string | URL): URL; /** * The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ - canParse(url: string | Location | URL, base?: string | URL | Location): boolean; + canParse(url: string | URL, base?: string | URL): boolean; /** * The **`createObjectURL()`** static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter. * @@ -38158,7 +38158,7 @@ declare var URL: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */ - parse(url: string | Location | URL, base?: string | URL | Location): URL | null; + parse(url: string | URL, base?: string | URL): URL | null; /** * The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL(). * @@ -42564,7 +42564,7 @@ interface WindowOrWorkerGlobalScope { createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ - fetch(input: RequestInfo | Location | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ @@ -42870,8 +42870,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/open) */ - open(method: string, url: string | Location | URL): void; - open(method: string, url: string | Location | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL): void; + open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; /** * The XMLHttpRequest method **`overrideMimeType()`** specifies a MIME type other than the one provided by the server to be used instead when interpreting the data being transferred in a request. * @@ -45002,7 +45002,7 @@ declare function clearTimeout(id: number | undefined): void; declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ -declare function fetch(input: RequestInfo | Location | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ declare function queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ diff --git a/baselines/ts5.6/serviceworker.generated.d.ts b/baselines/ts5.6/serviceworker.generated.d.ts index e7aa90dc7..afc9c9702 100644 --- a/baselines/ts5.6/serviceworker.generated.d.ts +++ b/baselines/ts5.6/serviceworker.generated.d.ts @@ -8462,7 +8462,7 @@ interface Request extends Body { declare var Request: { prototype: Request; - new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; + new(input: RequestInfo | URL, init?: RequestInit): Request; }; /** @@ -9514,19 +9514,19 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL; + new(url: string | URL, base?: string | URL): URL; /** * The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ - canParse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): boolean; + canParse(url: string | URL, base?: string | URL): boolean; /** * The **`URL.parse()`** static method of the URL interface returns a newly created URL object representing the URL defined by the parameters. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */ - parse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL | null; + parse(url: string | URL, base?: string | URL): URL | null; }; /** @@ -12574,7 +12574,7 @@ interface WindowOrWorkerGlobalScope { createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ - fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ @@ -13526,7 +13526,7 @@ declare function clearTimeout(id: number | undefined): void; declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ -declare function fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ declare function queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ diff --git a/baselines/ts5.6/sharedworker.generated.d.ts b/baselines/ts5.6/sharedworker.generated.d.ts index ad5d84c20..272a4fc47 100644 --- a/baselines/ts5.6/sharedworker.generated.d.ts +++ b/baselines/ts5.6/sharedworker.generated.d.ts @@ -8045,7 +8045,7 @@ interface Request extends Body { declare var Request: { prototype: Request; - new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; + new(input: RequestInfo | URL, init?: RequestInit): Request; }; /** @@ -9045,13 +9045,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL; + new(url: string | URL, base?: string | URL): URL; /** * The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ - canParse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): boolean; + canParse(url: string | URL, base?: string | URL): boolean; /** * The **`createObjectURL()`** static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter. * @@ -9063,7 +9063,7 @@ declare var URL: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */ - parse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL | null; + parse(url: string | URL, base?: string | URL): URL | null; /** * The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL(). * @@ -12080,7 +12080,7 @@ interface WindowOrWorkerGlobalScope { createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ - fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ @@ -12500,8 +12500,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/open) */ - open(method: string, url: string | WorkerLocation | URL): void; - open(method: string, url: string | WorkerLocation | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL): void; + open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; /** * The XMLHttpRequest method **`overrideMimeType()`** specifies a MIME type other than the one provided by the server to be used instead when interpreting the data being transferred in a request. * @@ -13216,7 +13216,7 @@ declare function clearTimeout(id: number | undefined): void; declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ -declare function fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ declare function queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ diff --git a/baselines/ts5.6/webworker.generated.d.ts b/baselines/ts5.6/webworker.generated.d.ts index f06292a87..e74ca3fe4 100644 --- a/baselines/ts5.6/webworker.generated.d.ts +++ b/baselines/ts5.6/webworker.generated.d.ts @@ -9613,7 +9613,7 @@ interface Request extends Body { declare var Request: { prototype: Request; - new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; + new(input: RequestInfo | URL, init?: RequestInit): Request; }; /** @@ -10801,13 +10801,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL; + new(url: string | URL, base?: string | URL): URL; /** * The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ - canParse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): boolean; + canParse(url: string | URL, base?: string | URL): boolean; /** * The **`createObjectURL()`** static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter. * @@ -10819,7 +10819,7 @@ declare var URL: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */ - parse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL | null; + parse(url: string | URL, base?: string | URL): URL | null; /** * The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL(). * @@ -14158,7 +14158,7 @@ interface WindowOrWorkerGlobalScope { createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ - fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ @@ -14584,8 +14584,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/open) */ - open(method: string, url: string | WorkerLocation | URL): void; - open(method: string, url: string | WorkerLocation | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL): void; + open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; /** * The XMLHttpRequest method **`overrideMimeType()`** specifies a MIME type other than the one provided by the server to be used instead when interpreting the data being transferred in a request. * @@ -15331,7 +15331,7 @@ declare function clearTimeout(id: number | undefined): void; declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ -declare function fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ declare function queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ diff --git a/baselines/ts5.9/dom.generated.d.ts b/baselines/ts5.9/dom.generated.d.ts index 2c94c0304..83e861452 100644 --- a/baselines/ts5.9/dom.generated.d.ts +++ b/baselines/ts5.9/dom.generated.d.ts @@ -31224,7 +31224,7 @@ interface Request extends Body { declare var Request: { prototype: Request; - new(input: RequestInfo | Location | URL, init?: RequestInit): Request; + new(input: RequestInfo | URL, init?: RequestInit): Request; }; /** @@ -38140,13 +38140,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | Location | URL, base?: string | URL | Location): URL; + new(url: string | URL, base?: string | URL): URL; /** * The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ - canParse(url: string | Location | URL, base?: string | URL | Location): boolean; + canParse(url: string | URL, base?: string | URL): boolean; /** * The **`createObjectURL()`** static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter. * @@ -38158,7 +38158,7 @@ declare var URL: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */ - parse(url: string | Location | URL, base?: string | URL | Location): URL | null; + parse(url: string | URL, base?: string | URL): URL | null; /** * The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL(). * @@ -42564,7 +42564,7 @@ interface WindowOrWorkerGlobalScope { createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ - fetch(input: RequestInfo | Location | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ @@ -42870,8 +42870,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/open) */ - open(method: string, url: string | Location | URL): void; - open(method: string, url: string | Location | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL): void; + open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; /** * The XMLHttpRequest method **`overrideMimeType()`** specifies a MIME type other than the one provided by the server to be used instead when interpreting the data being transferred in a request. * @@ -45002,7 +45002,7 @@ declare function clearTimeout(id: number | undefined): void; declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ -declare function fetch(input: RequestInfo | Location | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ declare function queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ diff --git a/baselines/ts5.9/serviceworker.generated.d.ts b/baselines/ts5.9/serviceworker.generated.d.ts index 42cc0a76c..377ca282f 100644 --- a/baselines/ts5.9/serviceworker.generated.d.ts +++ b/baselines/ts5.9/serviceworker.generated.d.ts @@ -8462,7 +8462,7 @@ interface Request extends Body { declare var Request: { prototype: Request; - new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; + new(input: RequestInfo | URL, init?: RequestInit): Request; }; /** @@ -9514,19 +9514,19 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL; + new(url: string | URL, base?: string | URL): URL; /** * The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ - canParse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): boolean; + canParse(url: string | URL, base?: string | URL): boolean; /** * The **`URL.parse()`** static method of the URL interface returns a newly created URL object representing the URL defined by the parameters. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */ - parse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL | null; + parse(url: string | URL, base?: string | URL): URL | null; }; /** @@ -12574,7 +12574,7 @@ interface WindowOrWorkerGlobalScope { createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ - fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ @@ -13526,7 +13526,7 @@ declare function clearTimeout(id: number | undefined): void; declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ -declare function fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ declare function queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ diff --git a/baselines/ts5.9/sharedworker.generated.d.ts b/baselines/ts5.9/sharedworker.generated.d.ts index d1ba1c70d..ef5f13c4b 100644 --- a/baselines/ts5.9/sharedworker.generated.d.ts +++ b/baselines/ts5.9/sharedworker.generated.d.ts @@ -8045,7 +8045,7 @@ interface Request extends Body { declare var Request: { prototype: Request; - new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; + new(input: RequestInfo | URL, init?: RequestInit): Request; }; /** @@ -9045,13 +9045,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL; + new(url: string | URL, base?: string | URL): URL; /** * The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ - canParse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): boolean; + canParse(url: string | URL, base?: string | URL): boolean; /** * The **`createObjectURL()`** static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter. * @@ -9063,7 +9063,7 @@ declare var URL: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */ - parse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL | null; + parse(url: string | URL, base?: string | URL): URL | null; /** * The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL(). * @@ -12080,7 +12080,7 @@ interface WindowOrWorkerGlobalScope { createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ - fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ @@ -12500,8 +12500,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/open) */ - open(method: string, url: string | WorkerLocation | URL): void; - open(method: string, url: string | WorkerLocation | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL): void; + open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; /** * The XMLHttpRequest method **`overrideMimeType()`** specifies a MIME type other than the one provided by the server to be used instead when interpreting the data being transferred in a request. * @@ -13216,7 +13216,7 @@ declare function clearTimeout(id: number | undefined): void; declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ -declare function fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ declare function queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ diff --git a/baselines/ts5.9/webworker.generated.d.ts b/baselines/ts5.9/webworker.generated.d.ts index b97d90878..69f511463 100644 --- a/baselines/ts5.9/webworker.generated.d.ts +++ b/baselines/ts5.9/webworker.generated.d.ts @@ -9613,7 +9613,7 @@ interface Request extends Body { declare var Request: { prototype: Request; - new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; + new(input: RequestInfo | URL, init?: RequestInit): Request; }; /** @@ -10801,13 +10801,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL; + new(url: string | URL, base?: string | URL): URL; /** * The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ - canParse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): boolean; + canParse(url: string | URL, base?: string | URL): boolean; /** * The **`createObjectURL()`** static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter. * @@ -10819,7 +10819,7 @@ declare var URL: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */ - parse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL | null; + parse(url: string | URL, base?: string | URL): URL | null; /** * The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL(). * @@ -14158,7 +14158,7 @@ interface WindowOrWorkerGlobalScope { createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ - fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ @@ -14584,8 +14584,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/open) */ - open(method: string, url: string | WorkerLocation | URL): void; - open(method: string, url: string | WorkerLocation | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL): void; + open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; /** * The XMLHttpRequest method **`overrideMimeType()`** specifies a MIME type other than the one provided by the server to be used instead when interpreting the data being transferred in a request. * @@ -15331,7 +15331,7 @@ declare function clearTimeout(id: number | undefined): void; declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ -declare function fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ declare function queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index 07959870c..45364e7b8 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -9616,7 +9616,7 @@ interface Request extends Body { declare var Request: { prototype: Request; - new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; + new(input: RequestInfo | URL, init?: RequestInit): Request; }; /** @@ -10804,13 +10804,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL; + new(url: string | URL, base?: string | URL): URL; /** * The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ - canParse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): boolean; + canParse(url: string | URL, base?: string | URL): boolean; /** * The **`createObjectURL()`** static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter. * @@ -10822,7 +10822,7 @@ declare var URL: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */ - parse(url: string | WorkerLocation | URL, base?: string | URL | WorkerLocation): URL | null; + parse(url: string | URL, base?: string | URL): URL | null; /** * The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL(). * @@ -14161,7 +14161,7 @@ interface WindowOrWorkerGlobalScope { createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ - fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ @@ -14587,8 +14587,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/open) */ - open(method: string, url: string | WorkerLocation | URL): void; - open(method: string, url: string | WorkerLocation | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL): void; + open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; /** * The XMLHttpRequest method **`overrideMimeType()`** specifies a MIME type other than the one provided by the server to be used instead when interpreting the data being transferred in a request. * @@ -15334,7 +15334,7 @@ declare function clearTimeout(id: number | undefined): void; declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise; declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ -declare function fetch(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */ declare function queueMicrotask(callback: VoidFunction): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */ diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index 8dabe6754..b20f538ba 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -1545,6 +1545,48 @@ } } }, + "URL": { + "constructor": { + "signature": { + "0": { + "param": [ + { + "name": "base", + "additionalTypes": ["URL"] + } + ] + } + } + }, + "methods": { + "method": { + "canParse": { + "signature": { + "0": { + "param": [ + { + "name": "base", + "additionalTypes": ["URL"] + } + ] + } + } + }, + "parse": { + "signature": { + "0": { + "param": [ + { + "name": "base", + "additionalTypes": ["URL"] + } + ] + } + } + } + } + } + }, "Client": { "properties": { "property": { diff --git a/inputfiles/patches/fetch.kdl b/inputfiles/patches/fetch.kdl index 3cf438816..686fb70aa 100644 --- a/inputfiles/patches/fetch.kdl +++ b/inputfiles/patches/fetch.kdl @@ -3,11 +3,3 @@ removals { text // No implementation as of 2026-04 } } - -interface Request { - constructor signatureIndex=0 { - param input { - additionalTypes Location WorkerLocation - } - } -} diff --git a/inputfiles/patches/html.kdl b/inputfiles/patches/html.kdl index 09f4b4c3b..99670f184 100644 --- a/inputfiles/patches/html.kdl +++ b/inputfiles/patches/html.kdl @@ -207,14 +207,6 @@ interface SVGElement { includes HTMLOrSVGElement } -interface-mixin WindowOrWorkerGlobalScope { - method fetch signatureIndex=0 { - param input { - additionalTypes Location WorkerLocation - } - } -} - removals { dictionary CanvasRenderingContext2DSettings { member colorType // Blink-only as of 2025-12, being tested in WebKit diff --git a/inputfiles/patches/url.kdl b/inputfiles/patches/url.kdl index b6095cfdf..b4fbeb195 100644 --- a/inputfiles/patches/url.kdl +++ b/inputfiles/patches/url.kdl @@ -5,30 +5,3 @@ interface URLSearchParams { } } } - -interface URL { - constructor signatureIndex=0 { - param url { - additionalTypes Location WorkerLocation - } - param base { - additionalTypes URL Location WorkerLocation - } - } - method canParse signatureIndex=0 { - param url { - additionalTypes Location WorkerLocation - } - param base { - additionalTypes URL Location WorkerLocation - } - } - method parse signatureIndex=0 { - param url { - additionalTypes Location WorkerLocation - } - param base { - additionalTypes URL Location WorkerLocation - } - } -} diff --git a/inputfiles/patches/xhr.kdl b/inputfiles/patches/xhr.kdl deleted file mode 100644 index 0120d40ee..000000000 --- a/inputfiles/patches/xhr.kdl +++ /dev/null @@ -1,12 +0,0 @@ -interface XMLHttpRequest { - method open signatureIndex=0 { - param url { - additionalTypes Location WorkerLocation - } - } - method open signatureIndex=1 { - param url { - additionalTypes Location WorkerLocation - } - } -} diff --git a/src/build/expose.ts b/src/build/expose.ts index be94edf32..4c0c023c0 100644 --- a/src/build/expose.ts +++ b/src/build/expose.ts @@ -204,15 +204,7 @@ function deepFilterUnexposedTypes( const types = Array.isArray(p.type) ? p.type : [p]; const filtered = filterUnexposedTypeFromUnion(types, unexposedTypes); if (filtered.length >= 1) { - const additionalTypes = filterAdditionalTypes( - p.additionalTypes, - unexposedTypes, - ); - param.push({ - ...p, - type: flattenType(filtered), - additionalTypes, - }); + param.push({ ...p, type: flattenType(filtered) }); } else if (!p.optional) { throw new Error(`A non-optional parameter has unknown type: ${p.type}`); } else { @@ -245,36 +237,13 @@ function filterUnexposedType( unexposedTypes, ); if (filteredUnion.length) { - return { - ...type, - type: flattenType(filteredUnion), - additionalTypes: filterAdditionalTypes( - type.additionalTypes, - unexposedTypes, - ), - }; + return { ...type, type: flattenType(filteredUnion) }; } - } else if (!type.overrideType && unexposedTypes.has(type.type)) { - return; - } else { - const additionalTypes = filterAdditionalTypes( - type.additionalTypes, - unexposedTypes, - ); - return type.additionalTypes ? { ...type, additionalTypes } : type; + } else if (type.overrideType || !unexposedTypes.has(type.type)) { + return type; } } -function filterAdditionalTypes( - additionalTypes: string[] | undefined, - unexposedTypes: Set, -) { - const filtered = additionalTypes?.filter( - (additionalType) => !unexposedTypes.has(additionalType), - ); - return filtered?.length ? filtered : undefined; -} - function filterUnexposedTypeFromUnion( union: Browser.Typed[], unexposedTypes: Set,