Skip to content

Commit fa25364

Browse files
committed
add URL and URLSearcParams to knownWorkerInterfaces.json
1 parent 33d0b25 commit fa25364

File tree

4 files changed

+57
-93
lines changed

4 files changed

+57
-93
lines changed

baselines/dom.generated.d.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13859,25 +13859,6 @@ interface ImageBitmap {
1385913859
close(): void;
1386013860
}
1386113861

13862-
interface URL {
13863-
href: string;
13864-
readonly origin: string;
13865-
protocol: string;
13866-
username: string;
13867-
password: string;
13868-
host: string;
13869-
hostname: string;
13870-
port: string;
13871-
pathname: string;
13872-
search: string;
13873-
toJSON(): string;
13874-
}
13875-
13876-
declare var URL: {
13877-
prototype: URL;
13878-
new (url: string, base?: string): URL;
13879-
}
13880-
1388113862
interface URLSearchParams {
1388213863
/**
1388313864
* Appends a specified key/value pair as a new search parameter.

baselines/webworker.generated.d.ts

Lines changed: 54 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,6 +1008,29 @@ declare var SyncManager: {
10081008
new(): SyncManager;
10091009
}
10101010

1011+
interface URL {
1012+
hash: string;
1013+
host: string;
1014+
hostname: string;
1015+
href: string;
1016+
readonly origin: string;
1017+
password: string;
1018+
pathname: string;
1019+
port: string;
1020+
protocol: string;
1021+
search: string;
1022+
username: string;
1023+
readonly searchParams: URLSearchParams;
1024+
toString(): string;
1025+
}
1026+
1027+
declare var URL: {
1028+
prototype: URL;
1029+
new(url: string, base?: string): URL;
1030+
createObjectURL(object: any, options?: ObjectURLOptions): string;
1031+
revokeObjectURL(url: string): void;
1032+
}
1033+
10111034
interface WebSocketEventMap {
10121035
"close": CloseEvent;
10131036
"error": Event;
@@ -1486,23 +1509,39 @@ interface ImageBitmap {
14861509
close(): void;
14871510
}
14881511

1489-
interface URL {
1490-
href: string;
1491-
readonly origin: string;
1492-
protocol: string;
1493-
username: string;
1494-
password: string;
1495-
host: string;
1496-
hostname: string;
1497-
port: string;
1498-
pathname: string;
1499-
search: string;
1500-
toJSON(): string;
1512+
interface URLSearchParams {
1513+
/**
1514+
* Appends a specified key/value pair as a new search parameter.
1515+
*/
1516+
append(name: string, value: string): void;
1517+
/**
1518+
* Deletes the given search parameter, and its associated value, from the list of all search parameters.
1519+
*/
1520+
delete(name: string): void;
1521+
/**
1522+
* Returns the first value associated to the given search parameter.
1523+
*/
1524+
get(name: string): string | null;
1525+
/**
1526+
* Returns all the values association with a given search parameter.
1527+
*/
1528+
getAll(name: string): string[];
1529+
/**
1530+
* Returns a Boolean indicating if such a search parameter exists.
1531+
*/
1532+
has(name: string): boolean;
1533+
/**
1534+
* Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
1535+
*/
1536+
set(name: string, value: string): void;
15011537
}
15021538

1503-
declare var URL: {
1504-
prototype: URL;
1505-
new (url: string, base?: string): URL;
1539+
declare var URLSearchParams: {
1540+
prototype: URLSearchParams;
1541+
/**
1542+
* Constructor returning a URLSearchParams object.
1543+
*/
1544+
new (init?: string | URLSearchParams): URLSearchParams;
15061545
}
15071546

15081547
interface BlobPropertyBag {

inputfiles/addedTypes.json

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -178,67 +178,9 @@
178178
"name": "multiEntry",
179179
"type": "boolean"
180180
},
181-
{
182-
"kind": "interface",
183-
"name": "URL",
184-
"flavor": "Worker",
185-
"constructorSignatures": [
186-
"new (url: string, base?: string): URL"
187-
],
188-
"properties": [
189-
{
190-
"name": "href",
191-
"type": "string"
192-
},
193-
{
194-
"name": "origin",
195-
"type": "string",
196-
"readonly": true
197-
},
198-
{
199-
"name": "protocol",
200-
"type": "string"
201-
},
202-
{
203-
"name": "username",
204-
"type": "string"
205-
},
206-
{
207-
"name": "password",
208-
"type": "string"
209-
},
210-
{
211-
"name": "host",
212-
"type": "string"
213-
},
214-
{
215-
"name": "hostname",
216-
"type": "string"
217-
},
218-
{
219-
"name": "port",
220-
"type": "string"
221-
},
222-
{
223-
"name": "pathname",
224-
"type": "string"
225-
},
226-
{
227-
"name": "search",
228-
"type": "string"
229-
}
230-
],
231-
"methods": [
232-
{
233-
"name": "toJSON",
234-
"signatures": ["toJSON(): string"]
235-
}
236-
]
237-
},
238181
{
239182
"kind": "interface",
240183
"name": "URLSearchParams",
241-
"flavor": "All",
242184
"constructorSignatures": [
243185
"new (init?: string | URLSearchParams): URLSearchParams"
244186
],

inputfiles/knownWorkerInterfaces.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,13 @@
9191
"SyncEventInit",
9292
"SyncManager",
9393
"USVString",
94+
"URL",
95+
"URLSearchParams",
9496
"WebSocket",
9597
"WindowBase64",
9698
"WindowConsole",
9799
"Worker",
98100
"XMLHttpRequest",
99101
"XMLHttpRequestEventTarget",
100102
"XMLHttpRequestUpload"
101-
]
103+
]

0 commit comments

Comments
 (0)