Update the `URL.canParse` and `URL.parse` types (#1755)

Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
This commit is contained in:
Kenta Moriuchi 2024-07-04 02:48:55 +09:00 коммит произвёл GitHub
Родитель 86b6edc45f
Коммит 2939d4ffe6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
6 изменённых файлов: 38 добавлений и 10 удалений

4
baselines/audioworklet.generated.d.ts поставляемый
Просмотреть файл

@ -1016,9 +1016,9 @@ declare var URL: {
prototype: URL;
new(url: string | URL, base?: string | URL): URL;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */
canParse(url: string | URL, base?: string): boolean;
canParse(url: string | URL, base?: string | URL): boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */
parse(url: string | URL, base?: string): URL | null;
parse(url: string | URL, base?: string | URL): URL | null;
};
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */

4
baselines/dom.generated.d.ts поставляемый
Просмотреть файл

@ -22356,11 +22356,11 @@ declare var URL: {
prototype: URL;
new(url: string | URL, base?: string | URL): URL;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */
canParse(url: string | URL, base?: string): boolean;
canParse(url: string | URL, base?: string | URL): boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static) */
createObjectURL(obj: Blob | MediaSource): string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */
parse(url: string | URL, base?: string): URL | null;
parse(url: string | URL, base?: string | URL): URL | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static) */
revokeObjectURL(url: string): void;
};

4
baselines/serviceworker.generated.d.ts поставляемый
Просмотреть файл

@ -5265,9 +5265,9 @@ declare var URL: {
prototype: URL;
new(url: string | URL, base?: string | URL): URL;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */
canParse(url: string | URL, base?: string): boolean;
canParse(url: string | URL, base?: string | URL): boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */
parse(url: string | URL, base?: string): URL | null;
parse(url: string | URL, base?: string | URL): URL | null;
};
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */

4
baselines/sharedworker.generated.d.ts поставляемый
Просмотреть файл

@ -5074,11 +5074,11 @@ declare var URL: {
prototype: URL;
new(url: string | URL, base?: string | URL): URL;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */
canParse(url: string | URL, base?: string): boolean;
canParse(url: string | URL, base?: string | URL): boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static) */
createObjectURL(obj: Blob): string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */
parse(url: string | URL, base?: string): URL | null;
parse(url: string | URL, base?: string | URL): URL | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static) */
revokeObjectURL(url: string): void;
};

4
baselines/webworker.generated.d.ts поставляемый
Просмотреть файл

@ -5644,11 +5644,11 @@ declare var URL: {
prototype: URL;
new(url: string | URL, base?: string | URL): URL;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */
canParse(url: string | URL, base?: string): boolean;
canParse(url: string | URL, base?: string | URL): boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static) */
createObjectURL(obj: Blob): string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */
parse(url: string | URL, base?: string): URL | null;
parse(url: string | URL, base?: string | URL): URL | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static) */
revokeObjectURL(url: string): void;
};

Просмотреть файл

@ -2061,6 +2061,34 @@
]
}
}
},
"methods": {
"method": {
"canParse": {
"signature": {
"0": {
"param": [
{
"name": "base",
"additionalTypes": ["URL"]
}
]
}
}
},
"parse": {
"signature": {
"0": {
"param": [
{
"name": "base",
"additionalTypes": ["URL"]
}
]
}
}
}
}
}
},
"Client": {