Skip to content

Commit ea58597

Browse files
authored
Merge pull request #332 from Nullizer/fix-URL-constructor
Allow URL Object as constructor's base parameter
2 parents 42ec97f + 8b51917 commit ea58597

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

baselines/dom.generated.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12213,7 +12213,7 @@ interface URL {
1221312213

1221412214
declare var URL: {
1221512215
prototype: URL;
12216-
new(url: string, base?: string): URL;
12216+
new(url: string, base?: string | URL): URL;
1221712217
createObjectURL(object: any, options?: ObjectURLOptions): string;
1221812218
revokeObjectURL(url: string): void;
1221912219
};

baselines/webworker.generated.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ interface URL {
10611061

10621062
declare var URL: {
10631063
prototype: URL;
1064-
new(url: string, base?: string): URL;
1064+
new(url: string, base?: string | URL): URL;
10651065
createObjectURL(object: any, options?: ObjectURLOptions): string;
10661066
revokeObjectURL(url: string): void;
10671067
};

inputfiles/overridingTypes.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,5 +1725,12 @@
17251725
"isPointInStroke(x: number, y: number, fillRule?: CanvasFillRule): boolean",
17261726
"isPointInStroke(path: Path2D, x: number, y: number, fillRule?: CanvasFillRule): boolean"
17271727
]
1728+
},
1729+
{
1730+
"kind": "constructor",
1731+
"interface": "URL",
1732+
"signatures": [
1733+
"new(url: string, base?: string | URL): URL"
1734+
]
17281735
}
17291736
]

0 commit comments

Comments
 (0)