diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 74c47ae0d..1b81b5dcf 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 | URL, init?: RequestInit): Request; + new(input: RequestInfo | Location | URL, init?: RequestInit): Request; }; /** @@ -38143,13 +38143,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | URL, base?: string | URL): URL; + new(url: string | URL | Location, base?: string | URL | Location): 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 | URL, base?: string | URL): boolean; + canParse(url: string | URL | Location, base?: string | URL | Location): 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 | URL, base?: string | URL): URL | null; + parse(url: string | URL | Location, base?: string | URL | Location): URL | null; /** * The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL(). * @@ -42559,7 +42559,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 | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | Location | 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) */ @@ -42865,8 +42865,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/open) */ - open(method: string, url: string | URL): void; - open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL | Location): void; + open(method: string, url: string | URL | Location, 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. * @@ -44997,7 +44997,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 | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | Location | 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 190881a28..8be38a398 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 | URL, init?: RequestInit): Request; + new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; }; /** @@ -9517,19 +9517,19 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | URL, base?: string | URL): URL; + new(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): boolean; + canParse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): URL | null; + parse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | WorkerLocation | 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 | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | WorkerLocation | 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 602f794ec..207b583c1 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 | URL, init?: RequestInit): Request; + new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; }; /** @@ -9048,13 +9048,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | URL, base?: string | URL): URL; + new(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): boolean; + canParse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): URL | null; + parse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | WorkerLocation | 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 | URL): void; - open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL | WorkerLocation): void; + open(method: string, url: string | URL | WorkerLocation, 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 | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | WorkerLocation | 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 61e3f2db2..414dfd43c 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 | URL, init?: RequestInit): Request; + new(input: RequestInfo | Location | URL, init?: RequestInit): Request; }; /** @@ -38117,13 +38117,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | URL, base?: string | URL): URL; + new(url: string | URL | Location, base?: string | URL | Location): 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 | URL, base?: string | URL): boolean; + canParse(url: string | URL | Location, base?: string | URL | Location): 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 | URL, base?: string | URL): URL | null; + parse(url: string | URL | Location, base?: string | URL | Location): URL | null; /** * The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL(). * @@ -42533,7 +42533,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 | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | Location | 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) */ @@ -42839,8 +42839,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/open) */ - open(method: string, url: string | URL): void; - open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL | Location): void; + open(method: string, url: string | URL | Location, 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. * @@ -44971,7 +44971,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 | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | Location | 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 afc9c9702..3913ebe9d 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 | URL, init?: RequestInit): Request; + new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; }; /** @@ -9514,19 +9514,19 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | URL, base?: string | URL): URL; + new(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): boolean; + canParse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): URL | null; + parse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | WorkerLocation | 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 | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | WorkerLocation | 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 272a4fc47..5fdec0933 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 | URL, init?: RequestInit): Request; + new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; }; /** @@ -9045,13 +9045,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | URL, base?: string | URL): URL; + new(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): boolean; + canParse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): URL | null; + parse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | WorkerLocation | 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 | URL): void; - open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL | WorkerLocation): void; + open(method: string, url: string | URL | WorkerLocation, 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 | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | WorkerLocation | 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 e74ca3fe4..9af48ce54 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 | URL, init?: RequestInit): Request; + new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; }; /** @@ -10801,13 +10801,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | URL, base?: string | URL): URL; + new(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): boolean; + canParse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): URL | null; + parse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | WorkerLocation | 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 | URL): void; - open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL | WorkerLocation): void; + open(method: string, url: string | URL | WorkerLocation, 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 | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | WorkerLocation | 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 ec099f4f8..12deae11e 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 | URL, init?: RequestInit): Request; + new(input: RequestInfo | Location | URL, init?: RequestInit): Request; }; /** @@ -38140,13 +38140,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | URL, base?: string | URL): URL; + new(url: string | URL | Location, base?: string | URL | Location): 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 | URL, base?: string | URL): boolean; + canParse(url: string | URL | Location, base?: string | URL | Location): 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 | URL, base?: string | URL): URL | null; + parse(url: string | URL | Location, base?: string | URL | Location): URL | null; /** * The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL(). * @@ -42556,7 +42556,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 | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | Location | 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) */ @@ -42862,8 +42862,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/open) */ - open(method: string, url: string | URL): void; - open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL | Location): void; + open(method: string, url: string | URL | Location, 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. * @@ -44994,7 +44994,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 | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | Location | 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 afc9c9702..3913ebe9d 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 | URL, init?: RequestInit): Request; + new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; }; /** @@ -9514,19 +9514,19 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | URL, base?: string | URL): URL; + new(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): boolean; + canParse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): URL | null; + parse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | WorkerLocation | 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 | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | WorkerLocation | 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 272a4fc47..5fdec0933 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 | URL, init?: RequestInit): Request; + new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; }; /** @@ -9045,13 +9045,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | URL, base?: string | URL): URL; + new(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): boolean; + canParse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): URL | null; + parse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | WorkerLocation | 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 | URL): void; - open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL | WorkerLocation): void; + open(method: string, url: string | URL | WorkerLocation, 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 | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | WorkerLocation | 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 e74ca3fe4..9af48ce54 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 | URL, init?: RequestInit): Request; + new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; }; /** @@ -10801,13 +10801,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | URL, base?: string | URL): URL; + new(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): boolean; + canParse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): URL | null; + parse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | WorkerLocation | 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 | URL): void; - open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL | WorkerLocation): void; + open(method: string, url: string | URL | WorkerLocation, 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 | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | WorkerLocation | 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 c7be83a7a..a5646cb8b 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 | URL, init?: RequestInit): Request; + new(input: RequestInfo | Location | URL, init?: RequestInit): Request; }; /** @@ -38140,13 +38140,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | URL, base?: string | URL): URL; + new(url: string | URL | Location, base?: string | URL | Location): 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 | URL, base?: string | URL): boolean; + canParse(url: string | URL | Location, base?: string | URL | Location): 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 | URL, base?: string | URL): URL | null; + parse(url: string | URL | Location, base?: string | URL | Location): URL | null; /** * The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL(). * @@ -42556,7 +42556,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 | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | Location | 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) */ @@ -42862,8 +42862,8 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/open) */ - open(method: string, url: string | URL): void; - open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL | Location): void; + open(method: string, url: string | URL | Location, 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. * @@ -44994,7 +44994,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 | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | Location | 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 377ca282f..47e95fd7c 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 | URL, init?: RequestInit): Request; + new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; }; /** @@ -9514,19 +9514,19 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | URL, base?: string | URL): URL; + new(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): boolean; + canParse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): URL | null; + parse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | WorkerLocation | 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 | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | WorkerLocation | 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 ef5f13c4b..1e08e6ea3 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 | URL, init?: RequestInit): Request; + new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; }; /** @@ -9045,13 +9045,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | URL, base?: string | URL): URL; + new(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): boolean; + canParse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): URL | null; + parse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | WorkerLocation | 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 | URL): void; - open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL | WorkerLocation): void; + open(method: string, url: string | URL | WorkerLocation, 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 | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | WorkerLocation | 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 69f511463..196f1b047 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 | URL, init?: RequestInit): Request; + new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; }; /** @@ -10801,13 +10801,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | URL, base?: string | URL): URL; + new(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): boolean; + canParse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): URL | null; + parse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | WorkerLocation | 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 | URL): void; - open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL | WorkerLocation): void; + open(method: string, url: string | URL | WorkerLocation, 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 | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | WorkerLocation | 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 45364e7b8..c7e4d50b3 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 | URL, init?: RequestInit): Request; + new(input: RequestInfo | WorkerLocation | URL, init?: RequestInit): Request; }; /** @@ -10804,13 +10804,13 @@ interface URL { declare var URL: { prototype: URL; - new(url: string | URL, base?: string | URL): URL; + new(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): boolean; + canParse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, base?: string | URL): URL | null; + parse(url: string | URL | WorkerLocation, base?: string | URL | WorkerLocation): 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 | URL, init?: RequestInit): Promise; + fetch(input: RequestInfo | WorkerLocation | 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 | URL): void; - open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL | WorkerLocation): void; + open(method: string, url: string | URL | WorkerLocation, 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 | URL, init?: RequestInit): Promise; +declare function fetch(input: RequestInfo | WorkerLocation | 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 b20f538ba..8dabe6754 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -1545,48 +1545,6 @@ } } }, - "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 686fb70aa..3cf438816 100644 --- a/inputfiles/patches/fetch.kdl +++ b/inputfiles/patches/fetch.kdl @@ -3,3 +3,11 @@ 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 bd56b40ca..9e8ecb31f 100644 --- a/inputfiles/patches/html.kdl +++ b/inputfiles/patches/html.kdl @@ -206,6 +206,14 @@ 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 b4fbeb195..cabea3eb7 100644 --- a/inputfiles/patches/url.kdl +++ b/inputfiles/patches/url.kdl @@ -5,3 +5,30 @@ interface URLSearchParams { } } } + +interface URL { + constructor signatureIndex=0 { + param url { + additionalTypes URL Location WorkerLocation + } + param base { + additionalTypes URL Location WorkerLocation + } + } + method canParse signatureIndex=0 { + param url { + additionalTypes URL Location WorkerLocation + } + param base { + additionalTypes URL Location WorkerLocation + } + } + method parse signatureIndex=0 { + param url { + additionalTypes URL Location WorkerLocation + } + param base { + additionalTypes URL Location WorkerLocation + } + } +} diff --git a/inputfiles/patches/xhr.kdl b/inputfiles/patches/xhr.kdl new file mode 100644 index 000000000..32f8f5be3 --- /dev/null +++ b/inputfiles/patches/xhr.kdl @@ -0,0 +1,12 @@ +interface XMLHttpRequest { + method open signatureIndex=0 { + param url { + additionalTypes URL Location WorkerLocation + } + } + method open signatureIndex=1 { + param url { + additionalTypes URL Location WorkerLocation + } + } +} diff --git a/src/build/emitter.ts b/src/build/emitter.ts index 31e43749f..d9a33a56a 100644 --- a/src/build/emitter.ts +++ b/src/build/emitter.ts @@ -429,7 +429,11 @@ export function emitWebIdl( typeof obj.type === "string" ? [{ ...obj, additionalTypes: undefined }] : obj.type; - types.push(...(obj.additionalTypes ?? []).map((t) => ({ type: t }))); + types.push( + ...(obj.additionalTypes ?? []) + .filter((t) => isKnownType(t)) + .map((t) => ({ type: t })), + ); // propagate `any` const converted = types.map((t) => @@ -520,6 +524,18 @@ export function emitWebIdl( throw new Error("Unknown DOM type: " + objDomType); } + function isKnownType(type: string) { + return ( + baseTypeConversionMap.has(type) || + allInterfacesMap[type] || + allLegacyWindowAliases.includes(type) || + allCallbackFunctionsMap[type] || + allDictionariesMap[type] || + allEnumsMap[type] || + allTypedefsMap[type] + ); + } + function makeNullable(originalType: string) { switch (originalType) { case "any": @@ -795,7 +811,9 @@ export function emitWebIdl( p = resolvePromise(p); if (acceptsUrl(p)) { p = { ...p, additionalTypes: [...(p.additionalTypes ?? [])] }; - p.additionalTypes!.push("URL"); + if (!p.additionalTypes!.includes("URL")) { + p.additionalTypes!.push("URL"); + } } const pType = convertDomTypeToTsType(p); diff --git a/src/build/expose.ts b/src/build/expose.ts index 4c0c023c0..a60d45f3d 100644 --- a/src/build/expose.ts +++ b/src/build/expose.ts @@ -177,6 +177,9 @@ function deepFilterUnexposedTypes( unexposedTypes: Set, ) { return deepClone(webidl, (o) => { + if (o.additionalTypes) { + return filterUnexposedType(o, unexposedTypes); + } if (Array.isArray(o.type)) { return { ...o, @@ -237,13 +240,35 @@ function filterUnexposedType( unexposedTypes, ); if (filteredUnion.length) { - return { ...type, type: flattenType(filteredUnion) }; + return { + ...type, + type: flattenType(filteredUnion), + additionalTypes: filterAdditionalTypes( + type.additionalTypes, + unexposedTypes, + ), + }; } - } else if (type.overrideType || !unexposedTypes.has(type.type)) { - return type; + } else if (!type.overrideType && unexposedTypes.has(type.type)) { + return; + } else { + const additionalTypes = filterAdditionalTypes( + type.additionalTypes, + unexposedTypes, + ); + return additionalTypes ? { ...type, additionalTypes } : type; } } +function filterAdditionalTypes( + additionalTypes: string[] | undefined, + unexposedTypes: Set, +) { + return additionalTypes?.filter( + (additionalType) => !unexposedTypes.has(additionalType), + ); +} + function filterUnexposedTypeFromUnion( union: Browser.Typed[], unexposedTypes: Set,