Skip to content

Commit

Permalink
Update the URL.canParse and URL.parse types (#1755)
Browse files Browse the repository at this point in the history
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
  • Loading branch information
petamoriken and saschanaz authored Jul 3, 2024
1 parent 86b6edc commit 2939d4f
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 10 deletions.
4 changes: 2 additions & 2 deletions baselines/audioworklet.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) */
Expand Down
4 changes: 2 additions & 2 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
4 changes: 2 additions & 2 deletions baselines/serviceworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) */
Expand Down
4 changes: 2 additions & 2 deletions baselines/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
4 changes: 2 additions & 2 deletions baselines/webworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
28 changes: 28 additions & 0 deletions inputfiles/overridingTypes.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2061,6 +2061,34 @@
]
}
}
},
"methods": {
"method": {
"canParse": {
"signature": {
"0": {
"param": [
{
"name": "base",
"additionalTypes": ["URL"]
}
]
}
}
},
"parse": {
"signature": {
"0": {
"param": [
{
"name": "base",
"additionalTypes": ["URL"]
}
]
}
}
}
}
}
},
"Client": {
Expand Down

0 comments on commit 2939d4f

Please sign in to comment.