diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 74c47ae0d..5ea64c2a5 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 | Location | URL, 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 | Location | URL, 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 | Location | URL, 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 | Location | URL): void; + open(method: string, url: string | Location | 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. * @@ -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..fd87652cd 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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..7aa724ad6 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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 | WorkerLocation | URL): void; + open(method: string, url: string | WorkerLocation | 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 | 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..083e3b773 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 | Location | URL, 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 | Location | URL, 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 | Location | URL, 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 | Location | URL): void; + open(method: string, url: string | Location | 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. * @@ -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..e7aa90dc7 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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..ad5d84c20 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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 | WorkerLocation | URL): void; + open(method: string, url: string | WorkerLocation | 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 | 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..f06292a87 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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 | WorkerLocation | URL): void; + open(method: string, url: string | WorkerLocation | 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 | 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..f33274ef4 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 | Location | URL, 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 | Location | URL, 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 | Location | URL, 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 | Location | URL): void; + open(method: string, url: string | Location | 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. * @@ -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..e7aa90dc7 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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..ad5d84c20 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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 | WorkerLocation | URL): void; + open(method: string, url: string | WorkerLocation | 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 | 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..f06292a87 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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 | WorkerLocation | URL): void; + open(method: string, url: string | WorkerLocation | 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 | 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..806caaaf6 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 | Location | URL, 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 | Location | URL, 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 | Location | URL, 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 | Location | URL): void; + open(method: string, url: string | Location | 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. * @@ -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..42cc0a76c 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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..d1ba1c70d 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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 | WorkerLocation | URL): void; + open(method: string, url: string | WorkerLocation | 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 | 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..b97d90878 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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 | WorkerLocation | URL): void; + open(method: string, url: string | WorkerLocation | 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 | 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..07959870c 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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 | WorkerLocation | URL, 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 | WorkerLocation | URL): void; + open(method: string, url: string | WorkerLocation | 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 | 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..b6095cfdf 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 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 new file mode 100644 index 000000000..0120d40ee --- /dev/null +++ b/inputfiles/patches/xhr.kdl @@ -0,0 +1,12 @@ +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 4c0c023c0..be94edf32 100644 --- a/src/build/expose.ts +++ b/src/build/expose.ts @@ -204,7 +204,15 @@ function deepFilterUnexposedTypes( const types = Array.isArray(p.type) ? p.type : [p]; const filtered = filterUnexposedTypeFromUnion(types, unexposedTypes); if (filtered.length >= 1) { - param.push({ ...p, type: flattenType(filtered) }); + const additionalTypes = filterAdditionalTypes( + p.additionalTypes, + unexposedTypes, + ); + param.push({ + ...p, + type: flattenType(filtered), + additionalTypes, + }); } else if (!p.optional) { throw new Error(`A non-optional parameter has unknown type: ${p.type}`); } else { @@ -237,13 +245,36 @@ 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 type.additionalTypes ? { ...type, additionalTypes } : 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,