mcpbrowser 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/README.md +34 -19
  2. package/package.json +1 -1
  3. package/server.json +2 -2
  4. package/.mcpregistry_github_token +0 -1
  5. package/.mcpregistry_registry_token +0 -1
  6. package/extension/mcpbrowser-0.1.1.vsix +0 -0
  7. package/extension/mcpbrowser-0.1.2.vsix +0 -0
  8. package/extension/mcpbrowser-0.1.3.vsix +0 -0
  9. package/extension/mcpbrowser-0.1.4.vsix +0 -0
  10. package/extension/mcpbrowser-config-0.1.0.vsix +0 -0
  11. package/extension/node_modules/.package-lock.json +0 -32
  12. package/extension/node_modules/@types/node/LICENSE +0 -21
  13. package/extension/node_modules/@types/node/README.md +0 -15
  14. package/extension/node_modules/@types/node/assert/strict.d.ts +0 -8
  15. package/extension/node_modules/@types/node/assert.d.ts +0 -1062
  16. package/extension/node_modules/@types/node/async_hooks.d.ts +0 -605
  17. package/extension/node_modules/@types/node/buffer.buffer.d.ts +0 -471
  18. package/extension/node_modules/@types/node/buffer.d.ts +0 -1936
  19. package/extension/node_modules/@types/node/child_process.d.ts +0 -1475
  20. package/extension/node_modules/@types/node/cluster.d.ts +0 -577
  21. package/extension/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  22. package/extension/node_modules/@types/node/compatibility/index.d.ts +0 -9
  23. package/extension/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  24. package/extension/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  25. package/extension/node_modules/@types/node/console.d.ts +0 -452
  26. package/extension/node_modules/@types/node/constants.d.ts +0 -21
  27. package/extension/node_modules/@types/node/crypto.d.ts +0 -4590
  28. package/extension/node_modules/@types/node/dgram.d.ts +0 -597
  29. package/extension/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
  30. package/extension/node_modules/@types/node/dns/promises.d.ts +0 -479
  31. package/extension/node_modules/@types/node/dns.d.ts +0 -871
  32. package/extension/node_modules/@types/node/domain.d.ts +0 -170
  33. package/extension/node_modules/@types/node/events.d.ts +0 -977
  34. package/extension/node_modules/@types/node/fs/promises.d.ts +0 -1270
  35. package/extension/node_modules/@types/node/fs.d.ts +0 -4375
  36. package/extension/node_modules/@types/node/globals.d.ts +0 -172
  37. package/extension/node_modules/@types/node/globals.typedarray.d.ts +0 -38
  38. package/extension/node_modules/@types/node/http.d.ts +0 -2049
  39. package/extension/node_modules/@types/node/http2.d.ts +0 -2631
  40. package/extension/node_modules/@types/node/https.d.ts +0 -578
  41. package/extension/node_modules/@types/node/index.d.ts +0 -93
  42. package/extension/node_modules/@types/node/inspector.generated.d.ts +0 -3966
  43. package/extension/node_modules/@types/node/module.d.ts +0 -539
  44. package/extension/node_modules/@types/node/net.d.ts +0 -1012
  45. package/extension/node_modules/@types/node/os.d.ts +0 -506
  46. package/extension/node_modules/@types/node/package.json +0 -140
  47. package/extension/node_modules/@types/node/path.d.ts +0 -200
  48. package/extension/node_modules/@types/node/perf_hooks.d.ts +0 -961
  49. package/extension/node_modules/@types/node/process.d.ts +0 -1957
  50. package/extension/node_modules/@types/node/punycode.d.ts +0 -117
  51. package/extension/node_modules/@types/node/querystring.d.ts +0 -152
  52. package/extension/node_modules/@types/node/readline/promises.d.ts +0 -162
  53. package/extension/node_modules/@types/node/readline.d.ts +0 -589
  54. package/extension/node_modules/@types/node/repl.d.ts +0 -430
  55. package/extension/node_modules/@types/node/sea.d.ts +0 -153
  56. package/extension/node_modules/@types/node/stream/consumers.d.ts +0 -38
  57. package/extension/node_modules/@types/node/stream/promises.d.ts +0 -90
  58. package/extension/node_modules/@types/node/stream/web.d.ts +0 -533
  59. package/extension/node_modules/@types/node/stream.d.ts +0 -1675
  60. package/extension/node_modules/@types/node/string_decoder.d.ts +0 -67
  61. package/extension/node_modules/@types/node/test.d.ts +0 -1787
  62. package/extension/node_modules/@types/node/timers/promises.d.ts +0 -108
  63. package/extension/node_modules/@types/node/timers.d.ts +0 -286
  64. package/extension/node_modules/@types/node/tls.d.ts +0 -1255
  65. package/extension/node_modules/@types/node/trace_events.d.ts +0 -197
  66. package/extension/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -468
  67. package/extension/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -34
  68. package/extension/node_modules/@types/node/ts5.6/index.d.ts +0 -93
  69. package/extension/node_modules/@types/node/tty.d.ts +0 -208
  70. package/extension/node_modules/@types/node/url.d.ts +0 -964
  71. package/extension/node_modules/@types/node/util.d.ts +0 -2331
  72. package/extension/node_modules/@types/node/v8.d.ts +0 -809
  73. package/extension/node_modules/@types/node/vm.d.ts +0 -1001
  74. package/extension/node_modules/@types/node/wasi.d.ts +0 -181
  75. package/extension/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
  76. package/extension/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
  77. package/extension/node_modules/@types/node/web-globals/events.d.ts +0 -97
  78. package/extension/node_modules/@types/node/web-globals/fetch.d.ts +0 -46
  79. package/extension/node_modules/@types/node/worker_threads.d.ts +0 -715
  80. package/extension/node_modules/@types/node/zlib.d.ts +0 -540
  81. package/extension/node_modules/@types/vscode/LICENSE +0 -21
  82. package/extension/node_modules/@types/vscode/README.md +0 -15
  83. package/extension/node_modules/@types/vscode/index.d.ts +0 -21153
  84. package/extension/node_modules/@types/vscode/package.json +0 -26
  85. package/extension/node_modules/undici-types/LICENSE +0 -21
  86. package/extension/node_modules/undici-types/README.md +0 -6
  87. package/extension/node_modules/undici-types/agent.d.ts +0 -31
  88. package/extension/node_modules/undici-types/api.d.ts +0 -43
  89. package/extension/node_modules/undici-types/balanced-pool.d.ts +0 -29
  90. package/extension/node_modules/undici-types/cache.d.ts +0 -36
  91. package/extension/node_modules/undici-types/client.d.ts +0 -108
  92. package/extension/node_modules/undici-types/connector.d.ts +0 -34
  93. package/extension/node_modules/undici-types/content-type.d.ts +0 -21
  94. package/extension/node_modules/undici-types/cookies.d.ts +0 -28
  95. package/extension/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  96. package/extension/node_modules/undici-types/dispatcher.d.ts +0 -256
  97. package/extension/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  98. package/extension/node_modules/undici-types/errors.d.ts +0 -149
  99. package/extension/node_modules/undici-types/eventsource.d.ts +0 -61
  100. package/extension/node_modules/undici-types/fetch.d.ts +0 -209
  101. package/extension/node_modules/undici-types/file.d.ts +0 -39
  102. package/extension/node_modules/undici-types/filereader.d.ts +0 -54
  103. package/extension/node_modules/undici-types/formdata.d.ts +0 -108
  104. package/extension/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  105. package/extension/node_modules/undici-types/global-origin.d.ts +0 -7
  106. package/extension/node_modules/undici-types/handlers.d.ts +0 -15
  107. package/extension/node_modules/undici-types/header.d.ts +0 -4
  108. package/extension/node_modules/undici-types/index.d.ts +0 -71
  109. package/extension/node_modules/undici-types/interceptors.d.ts +0 -17
  110. package/extension/node_modules/undici-types/mock-agent.d.ts +0 -50
  111. package/extension/node_modules/undici-types/mock-client.d.ts +0 -25
  112. package/extension/node_modules/undici-types/mock-errors.d.ts +0 -12
  113. package/extension/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  114. package/extension/node_modules/undici-types/mock-pool.d.ts +0 -25
  115. package/extension/node_modules/undici-types/package.json +0 -55
  116. package/extension/node_modules/undici-types/patch.d.ts +0 -33
  117. package/extension/node_modules/undici-types/pool-stats.d.ts +0 -19
  118. package/extension/node_modules/undici-types/pool.d.ts +0 -39
  119. package/extension/node_modules/undici-types/proxy-agent.d.ts +0 -28
  120. package/extension/node_modules/undici-types/readable.d.ts +0 -65
  121. package/extension/node_modules/undici-types/retry-agent.d.ts +0 -8
  122. package/extension/node_modules/undici-types/retry-handler.d.ts +0 -116
  123. package/extension/node_modules/undici-types/util.d.ts +0 -18
  124. package/extension/node_modules/undici-types/webidl.d.ts +0 -228
  125. package/extension/node_modules/undici-types/websocket.d.ts +0 -150
@@ -1,964 +0,0 @@
1
- /**
2
- * The `node:url` module provides utilities for URL resolution and parsing. It can
3
- * be accessed using:
4
- *
5
- * ```js
6
- * import url from 'node:url';
7
- * ```
8
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/url.js)
9
- */
10
- declare module "url" {
11
- import { Blob as NodeBlob, NonSharedBuffer } from "node:buffer";
12
- import { ClientRequestArgs } from "node:http";
13
- import { ParsedUrlQuery, ParsedUrlQueryInput } from "node:querystring";
14
- // Input to `url.format`
15
- interface UrlObject {
16
- auth?: string | null | undefined;
17
- hash?: string | null | undefined;
18
- host?: string | null | undefined;
19
- hostname?: string | null | undefined;
20
- href?: string | null | undefined;
21
- pathname?: string | null | undefined;
22
- protocol?: string | null | undefined;
23
- search?: string | null | undefined;
24
- slashes?: boolean | null | undefined;
25
- port?: string | number | null | undefined;
26
- query?: string | null | ParsedUrlQueryInput | undefined;
27
- }
28
- // Output of `url.parse`
29
- interface Url {
30
- auth: string | null;
31
- hash: string | null;
32
- host: string | null;
33
- hostname: string | null;
34
- href: string;
35
- path: string | null;
36
- pathname: string | null;
37
- protocol: string | null;
38
- search: string | null;
39
- slashes: boolean | null;
40
- port: string | null;
41
- query: string | null | ParsedUrlQuery;
42
- }
43
- interface UrlWithParsedQuery extends Url {
44
- query: ParsedUrlQuery;
45
- }
46
- interface UrlWithStringQuery extends Url {
47
- query: string | null;
48
- }
49
- interface FileUrlToPathOptions {
50
- /**
51
- * `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default.
52
- * @default undefined
53
- */
54
- windows?: boolean | undefined;
55
- }
56
- interface PathToFileUrlOptions extends FileUrlToPathOptions {}
57
- /**
58
- * The `url.parse()` method takes a URL string, parses it, and returns a URL
59
- * object.
60
- *
61
- * A `TypeError` is thrown if `urlString` is not a string.
62
- *
63
- * A `URIError` is thrown if the `auth` property is present but cannot be decoded.
64
- *
65
- * `url.parse()` uses a lenient, non-standard algorithm for parsing URL
66
- * strings. It is prone to security issues such as [host name spoofing](https://hackerone.com/reports/678487) and incorrect handling of usernames and passwords. Do not use with untrusted
67
- * input. CVEs are not issued for `url.parse()` vulnerabilities. Use the `WHATWG URL` API instead.
68
- * @since v0.1.25
69
- * @deprecated Use the WHATWG URL API instead.
70
- * @param urlString The URL string to parse.
71
- * @param [parseQueryString=false] If `true`, the `query` property will always be set to an object returned by the {@link querystring} module's `parse()` method. If `false`, the `query` property
72
- * on the returned URL object will be an unparsed, undecoded string.
73
- * @param [slashesDenoteHost=false] If `true`, the first token after the literal string `//` and preceding the next `/` will be interpreted as the `host`. For instance, given `//foo/bar`, the
74
- * result would be `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`.
75
- */
76
- function parse(urlString: string): UrlWithStringQuery;
77
- function parse(
78
- urlString: string,
79
- parseQueryString: false | undefined,
80
- slashesDenoteHost?: boolean,
81
- ): UrlWithStringQuery;
82
- function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
83
- function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
84
- /**
85
- * The `url.format()` method returns a formatted URL string derived from `urlObject`.
86
- *
87
- * ```js
88
- * import url from 'node:url';
89
- * url.format({
90
- * protocol: 'https',
91
- * hostname: 'example.com',
92
- * pathname: '/some/path',
93
- * query: {
94
- * page: 1,
95
- * format: 'json',
96
- * },
97
- * });
98
- *
99
- * // => 'https://example.com/some/path?page=1&format=json'
100
- * ```
101
- *
102
- * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`.
103
- *
104
- * The formatting process operates as follows:
105
- *
106
- * * A new empty string `result` is created.
107
- * * If `urlObject.protocol` is a string, it is appended as-is to `result`.
108
- * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown.
109
- * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII
110
- * colon (`:`) character, the literal string `:` will be appended to `result`.
111
- * * If either of the following conditions is true, then the literal string `//` will be appended to `result`:
112
- * * `urlObject.slashes` property is true;
113
- * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`;
114
- * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string
115
- * and appended to `result` followed by the literal string `@`.
116
- * * If the `urlObject.host` property is `undefined` then:
117
- * * If the `urlObject.hostname` is a string, it is appended to `result`.
118
- * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string,
119
- * an `Error` is thrown.
120
- * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`:
121
- * * The literal string `:` is appended to `result`, and
122
- * * The value of `urlObject.port` is coerced to a string and appended to `result`.
123
- * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`.
124
- * * If the `urlObject.pathname` property is a string that is not an empty string:
125
- * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash
126
- * (`/`), then the literal string `'/'` is appended to `result`.
127
- * * The value of `urlObject.pathname` is appended to `result`.
128
- * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown.
129
- * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the
130
- * `querystring` module's `stringify()` method passing the value of `urlObject.query`.
131
- * * Otherwise, if `urlObject.search` is a string:
132
- * * If the value of `urlObject.search` _does not start_ with the ASCII question
133
- * mark (`?`) character, the literal string `?` is appended to `result`.
134
- * * The value of `urlObject.search` is appended to `result`.
135
- * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown.
136
- * * If the `urlObject.hash` property is a string:
137
- * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`)
138
- * character, the literal string `#` is appended to `result`.
139
- * * The value of `urlObject.hash` is appended to `result`.
140
- * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a
141
- * string, an `Error` is thrown.
142
- * * `result` is returned.
143
- * @since v0.1.25
144
- * @legacy Use the WHATWG URL API instead.
145
- * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
146
- */
147
- function format(urlObject: URL, options?: URLFormatOptions): string;
148
- /**
149
- * The `url.format()` method returns a formatted URL string derived from `urlObject`.
150
- *
151
- * ```js
152
- * import url from 'node:url';
153
- * url.format({
154
- * protocol: 'https',
155
- * hostname: 'example.com',
156
- * pathname: '/some/path',
157
- * query: {
158
- * page: 1,
159
- * format: 'json',
160
- * },
161
- * });
162
- *
163
- * // => 'https://example.com/some/path?page=1&format=json'
164
- * ```
165
- *
166
- * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`.
167
- *
168
- * The formatting process operates as follows:
169
- *
170
- * * A new empty string `result` is created.
171
- * * If `urlObject.protocol` is a string, it is appended as-is to `result`.
172
- * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown.
173
- * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII
174
- * colon (`:`) character, the literal string `:` will be appended to `result`.
175
- * * If either of the following conditions is true, then the literal string `//` will be appended to `result`:
176
- * * `urlObject.slashes` property is true;
177
- * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`;
178
- * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string
179
- * and appended to `result` followed by the literal string `@`.
180
- * * If the `urlObject.host` property is `undefined` then:
181
- * * If the `urlObject.hostname` is a string, it is appended to `result`.
182
- * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string,
183
- * an `Error` is thrown.
184
- * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`:
185
- * * The literal string `:` is appended to `result`, and
186
- * * The value of `urlObject.port` is coerced to a string and appended to `result`.
187
- * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`.
188
- * * If the `urlObject.pathname` property is a string that is not an empty string:
189
- * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash
190
- * (`/`), then the literal string `'/'` is appended to `result`.
191
- * * The value of `urlObject.pathname` is appended to `result`.
192
- * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown.
193
- * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the
194
- * `querystring` module's `stringify()` method passing the value of `urlObject.query`.
195
- * * Otherwise, if `urlObject.search` is a string:
196
- * * If the value of `urlObject.search` _does not start_ with the ASCII question
197
- * mark (`?`) character, the literal string `?` is appended to `result`.
198
- * * The value of `urlObject.search` is appended to `result`.
199
- * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown.
200
- * * If the `urlObject.hash` property is a string:
201
- * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`)
202
- * character, the literal string `#` is appended to `result`.
203
- * * The value of `urlObject.hash` is appended to `result`.
204
- * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a
205
- * string, an `Error` is thrown.
206
- * * `result` is returned.
207
- * @since v0.1.25
208
- * @legacy Use the WHATWG URL API instead.
209
- * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
210
- */
211
- function format(urlObject: UrlObject | string): string;
212
- /**
213
- * The `url.resolve()` method resolves a target URL relative to a base URL in a
214
- * manner similar to that of a web browser resolving an anchor tag.
215
- *
216
- * ```js
217
- * import url from 'node:url';
218
- * url.resolve('/one/two/three', 'four'); // '/one/two/four'
219
- * url.resolve('http://example.com/', '/one'); // 'http://example.com/one'
220
- * url.resolve('http://example.com/one', '/two'); // 'http://example.com/two'
221
- * ```
222
- *
223
- * To achieve the same result using the WHATWG URL API:
224
- *
225
- * ```js
226
- * function resolve(from, to) {
227
- * const resolvedUrl = new URL(to, new URL(from, 'resolve://'));
228
- * if (resolvedUrl.protocol === 'resolve:') {
229
- * // `from` is a relative URL.
230
- * const { pathname, search, hash } = resolvedUrl;
231
- * return pathname + search + hash;
232
- * }
233
- * return resolvedUrl.toString();
234
- * }
235
- *
236
- * resolve('/one/two/three', 'four'); // '/one/two/four'
237
- * resolve('http://example.com/', '/one'); // 'http://example.com/one'
238
- * resolve('http://example.com/one', '/two'); // 'http://example.com/two'
239
- * ```
240
- * @since v0.1.25
241
- * @legacy Use the WHATWG URL API instead.
242
- * @param from The base URL to use if `to` is a relative URL.
243
- * @param to The target URL to resolve.
244
- */
245
- function resolve(from: string, to: string): string;
246
- /**
247
- * Returns the [Punycode](https://tools.ietf.org/html/rfc5891#section-4.4) ASCII serialization of the `domain`. If `domain` is an
248
- * invalid domain, the empty string is returned.
249
- *
250
- * It performs the inverse operation to {@link domainToUnicode}.
251
- *
252
- * ```js
253
- * import url from 'node:url';
254
- *
255
- * console.log(url.domainToASCII('español.com'));
256
- * // Prints xn--espaol-zwa.com
257
- * console.log(url.domainToASCII('中文.com'));
258
- * // Prints xn--fiq228c.com
259
- * console.log(url.domainToASCII('xn--iñvalid.com'));
260
- * // Prints an empty string
261
- * ```
262
- * @since v7.4.0, v6.13.0
263
- */
264
- function domainToASCII(domain: string): string;
265
- /**
266
- * Returns the Unicode serialization of the `domain`. If `domain` is an invalid
267
- * domain, the empty string is returned.
268
- *
269
- * It performs the inverse operation to {@link domainToASCII}.
270
- *
271
- * ```js
272
- * import url from 'node:url';
273
- *
274
- * console.log(url.domainToUnicode('xn--espaol-zwa.com'));
275
- * // Prints español.com
276
- * console.log(url.domainToUnicode('xn--fiq228c.com'));
277
- * // Prints 中文.com
278
- * console.log(url.domainToUnicode('xn--iñvalid.com'));
279
- * // Prints an empty string
280
- * ```
281
- * @since v7.4.0, v6.13.0
282
- */
283
- function domainToUnicode(domain: string): string;
284
- /**
285
- * This function ensures the correct decodings of percent-encoded characters as
286
- * well as ensuring a cross-platform valid absolute path string.
287
- *
288
- * ```js
289
- * import { fileURLToPath } from 'node:url';
290
- *
291
- * const __filename = fileURLToPath(import.meta.url);
292
- *
293
- * new URL('file:///C:/path/').pathname; // Incorrect: /C:/path/
294
- * fileURLToPath('file:///C:/path/'); // Correct: C:\path\ (Windows)
295
- *
296
- * new URL('file://nas/foo.txt').pathname; // Incorrect: /foo.txt
297
- * fileURLToPath('file://nas/foo.txt'); // Correct: \\nas\foo.txt (Windows)
298
- *
299
- * new URL('file:///你好.txt').pathname; // Incorrect: /%E4%BD%A0%E5%A5%BD.txt
300
- * fileURLToPath('file:///你好.txt'); // Correct: /你好.txt (POSIX)
301
- *
302
- * new URL('file:///hello world').pathname; // Incorrect: /hello%20world
303
- * fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX)
304
- * ```
305
- * @since v10.12.0
306
- * @param url The file URL string or URL object to convert to a path.
307
- * @return The fully-resolved platform-specific Node.js file path.
308
- */
309
- function fileURLToPath(url: string | URL, options?: FileUrlToPathOptions): string;
310
- /**
311
- * This function ensures that `path` is resolved absolutely, and that the URL
312
- * control characters are correctly encoded when converting into a File URL.
313
- *
314
- * ```js
315
- * import { pathToFileURL } from 'node:url';
316
- *
317
- * new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1
318
- * pathToFileURL('/foo#1'); // Correct: file:///foo%231 (POSIX)
319
- *
320
- * new URL('/some/path%.c', 'file:'); // Incorrect: file:///some/path%.c
321
- * pathToFileURL('/some/path%.c'); // Correct: file:///some/path%25.c (POSIX)
322
- * ```
323
- * @since v10.12.0
324
- * @param path The path to convert to a File URL.
325
- * @return The file URL object.
326
- */
327
- function pathToFileURL(path: string, options?: PathToFileUrlOptions): URL;
328
- /**
329
- * This utility function converts a URL object into an ordinary options object as
330
- * expected by the `http.request()` and `https.request()` APIs.
331
- *
332
- * ```js
333
- * import { urlToHttpOptions } from 'node:url';
334
- * const myURL = new URL('https://a:b@測試?abc#foo');
335
- *
336
- * console.log(urlToHttpOptions(myURL));
337
- * /*
338
- * {
339
- * protocol: 'https:',
340
- * hostname: 'xn--g6w251d',
341
- * hash: '#foo',
342
- * search: '?abc',
343
- * pathname: '/',
344
- * path: '/?abc',
345
- * href: 'https://a:b@xn--g6w251d/?abc#foo',
346
- * auth: 'a:b'
347
- * }
348
- *
349
- * ```
350
- * @since v15.7.0, v14.18.0
351
- * @param url The `WHATWG URL` object to convert to an options object.
352
- * @return Options object
353
- */
354
- function urlToHttpOptions(url: URL): ClientRequestArgs;
355
- interface URLFormatOptions {
356
- /**
357
- * `true` if the serialized URL string should include the username and password, `false` otherwise.
358
- * @default true
359
- */
360
- auth?: boolean | undefined;
361
- /**
362
- * `true` if the serialized URL string should include the fragment, `false` otherwise.
363
- * @default true
364
- */
365
- fragment?: boolean | undefined;
366
- /**
367
- * `true` if the serialized URL string should include the search query, `false` otherwise.
368
- * @default true
369
- */
370
- search?: boolean | undefined;
371
- /**
372
- * `true` if Unicode characters appearing in the host component of the URL string should be encoded directly as opposed to
373
- * being Punycode encoded.
374
- * @default false
375
- */
376
- unicode?: boolean | undefined;
377
- }
378
- /**
379
- * Browser-compatible `URL` class, implemented by following the WHATWG URL
380
- * Standard. [Examples of parsed URLs](https://url.spec.whatwg.org/#example-url-parsing) may be found in the Standard itself.
381
- * The `URL` class is also available on the global object.
382
- *
383
- * In accordance with browser conventions, all properties of `URL` objects
384
- * are implemented as getters and setters on the class prototype, rather than as
385
- * data properties on the object itself. Thus, unlike `legacy urlObject`s,
386
- * using the `delete` keyword on any properties of `URL` objects (e.g. `delete myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will still
387
- * return `true`.
388
- * @since v7.0.0, v6.13.0
389
- */
390
- class URL {
391
- /**
392
- * Creates a `'blob:nodedata:...'` URL string that represents the given `Blob` object and can be used to retrieve the `Blob` later.
393
- *
394
- * ```js
395
- * import {
396
- * Blob,
397
- * resolveObjectURL,
398
- * } from 'node:buffer';
399
- *
400
- * const blob = new Blob(['hello']);
401
- * const id = URL.createObjectURL(blob);
402
- *
403
- * // later...
404
- *
405
- * const otherBlob = resolveObjectURL(id);
406
- * console.log(otherBlob.size);
407
- * ```
408
- *
409
- * The data stored by the registered `Blob` will be retained in memory until `URL.revokeObjectURL()` is called to remove it.
410
- *
411
- * `Blob` objects are registered within the current thread. If using Worker
412
- * Threads, `Blob` objects registered within one Worker will not be available
413
- * to other workers or the main thread.
414
- * @since v16.7.0
415
- * @experimental
416
- */
417
- static createObjectURL(blob: NodeBlob): string;
418
- /**
419
- * Removes the stored `Blob` identified by the given ID. Attempting to revoke a
420
- * ID that isn't registered will silently fail.
421
- * @since v16.7.0
422
- * @experimental
423
- * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
424
- */
425
- static revokeObjectURL(id: string): void;
426
- /**
427
- * Checks if an `input` relative to the `base` can be parsed to a `URL`.
428
- *
429
- * ```js
430
- * const isValid = URL.canParse('/foo', 'https://example.org/'); // true
431
- *
432
- * const isNotValid = URL.canParse('/foo'); // false
433
- * ```
434
- * @since v19.9.0
435
- * @param input The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is
436
- * `converted to a string` first.
437
- * @param base The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is `converted to a string` first.
438
- */
439
- static canParse(input: string, base?: string): boolean;
440
- /**
441
- * Parses a string as a URL. If `base` is provided, it will be used as the base URL for the purpose of resolving non-absolute `input` URLs.
442
- * Returns `null` if `input` is not a valid.
443
- * @param input The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is
444
- * `converted to a string` first.
445
- * @param base The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is `converted to a string` first.
446
- * @since v20.18.0
447
- */
448
- static parse(input: string, base?: string): URL | null;
449
- constructor(input: string | { toString: () => string }, base?: string | URL);
450
- /**
451
- * Gets and sets the fragment portion of the URL.
452
- *
453
- * ```js
454
- * const myURL = new URL('https://example.org/foo#bar');
455
- * console.log(myURL.hash);
456
- * // Prints #bar
457
- *
458
- * myURL.hash = 'baz';
459
- * console.log(myURL.href);
460
- * // Prints https://example.org/foo#baz
461
- * ```
462
- *
463
- * Invalid URL characters included in the value assigned to the `hash` property
464
- * are `percent-encoded`. The selection of which characters to
465
- * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
466
- */
467
- hash: string;
468
- /**
469
- * Gets and sets the host portion of the URL.
470
- *
471
- * ```js
472
- * const myURL = new URL('https://example.org:81/foo');
473
- * console.log(myURL.host);
474
- * // Prints example.org:81
475
- *
476
- * myURL.host = 'example.com:82';
477
- * console.log(myURL.href);
478
- * // Prints https://example.com:82/foo
479
- * ```
480
- *
481
- * Invalid host values assigned to the `host` property are ignored.
482
- */
483
- host: string;
484
- /**
485
- * Gets and sets the host name portion of the URL. The key difference between`url.host` and `url.hostname` is that `url.hostname` does _not_ include the
486
- * port.
487
- *
488
- * ```js
489
- * const myURL = new URL('https://example.org:81/foo');
490
- * console.log(myURL.hostname);
491
- * // Prints example.org
492
- *
493
- * // Setting the hostname does not change the port
494
- * myURL.hostname = 'example.com';
495
- * console.log(myURL.href);
496
- * // Prints https://example.com:81/foo
497
- *
498
- * // Use myURL.host to change the hostname and port
499
- * myURL.host = 'example.org:82';
500
- * console.log(myURL.href);
501
- * // Prints https://example.org:82/foo
502
- * ```
503
- *
504
- * Invalid host name values assigned to the `hostname` property are ignored.
505
- */
506
- hostname: string;
507
- /**
508
- * Gets and sets the serialized URL.
509
- *
510
- * ```js
511
- * const myURL = new URL('https://example.org/foo');
512
- * console.log(myURL.href);
513
- * // Prints https://example.org/foo
514
- *
515
- * myURL.href = 'https://example.com/bar';
516
- * console.log(myURL.href);
517
- * // Prints https://example.com/bar
518
- * ```
519
- *
520
- * Getting the value of the `href` property is equivalent to calling {@link toString}.
521
- *
522
- * Setting the value of this property to a new value is equivalent to creating a
523
- * new `URL` object using `new URL(value)`. Each of the `URL` object's properties will be modified.
524
- *
525
- * If the value assigned to the `href` property is not a valid URL, a `TypeError` will be thrown.
526
- */
527
- href: string;
528
- /**
529
- * Gets the read-only serialization of the URL's origin.
530
- *
531
- * ```js
532
- * const myURL = new URL('https://example.org/foo/bar?baz');
533
- * console.log(myURL.origin);
534
- * // Prints https://example.org
535
- * ```
536
- *
537
- * ```js
538
- * const idnURL = new URL('https://測試');
539
- * console.log(idnURL.origin);
540
- * // Prints https://xn--g6w251d
541
- *
542
- * console.log(idnURL.hostname);
543
- * // Prints xn--g6w251d
544
- * ```
545
- */
546
- readonly origin: string;
547
- /**
548
- * Gets and sets the password portion of the URL.
549
- *
550
- * ```js
551
- * const myURL = new URL('https://abc:xyz@example.com');
552
- * console.log(myURL.password);
553
- * // Prints xyz
554
- *
555
- * myURL.password = '123';
556
- * console.log(myURL.href);
557
- * // Prints https://abc:123@example.com/
558
- * ```
559
- *
560
- * Invalid URL characters included in the value assigned to the `password` property
561
- * are `percent-encoded`. The selection of which characters to
562
- * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
563
- */
564
- password: string;
565
- /**
566
- * Gets and sets the path portion of the URL.
567
- *
568
- * ```js
569
- * const myURL = new URL('https://example.org/abc/xyz?123');
570
- * console.log(myURL.pathname);
571
- * // Prints /abc/xyz
572
- *
573
- * myURL.pathname = '/abcdef';
574
- * console.log(myURL.href);
575
- * // Prints https://example.org/abcdef?123
576
- * ```
577
- *
578
- * Invalid URL characters included in the value assigned to the `pathname` property are `percent-encoded`. The selection of which characters
579
- * to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
580
- */
581
- pathname: string;
582
- /**
583
- * Gets and sets the port portion of the URL.
584
- *
585
- * The port value may be a number or a string containing a number in the range `0` to `65535` (inclusive). Setting the value to the default port of the `URL` objects given `protocol` will
586
- * result in the `port` value becoming
587
- * the empty string (`''`).
588
- *
589
- * The port value can be an empty string in which case the port depends on
590
- * the protocol/scheme:
591
- *
592
- * <omitted>
593
- *
594
- * Upon assigning a value to the port, the value will first be converted to a
595
- * string using `.toString()`.
596
- *
597
- * If that string is invalid but it begins with a number, the leading number is
598
- * assigned to `port`.
599
- * If the number lies outside the range denoted above, it is ignored.
600
- *
601
- * ```js
602
- * const myURL = new URL('https://example.org:8888');
603
- * console.log(myURL.port);
604
- * // Prints 8888
605
- *
606
- * // Default ports are automatically transformed to the empty string
607
- * // (HTTPS protocol's default port is 443)
608
- * myURL.port = '443';
609
- * console.log(myURL.port);
610
- * // Prints the empty string
611
- * console.log(myURL.href);
612
- * // Prints https://example.org/
613
- *
614
- * myURL.port = 1234;
615
- * console.log(myURL.port);
616
- * // Prints 1234
617
- * console.log(myURL.href);
618
- * // Prints https://example.org:1234/
619
- *
620
- * // Completely invalid port strings are ignored
621
- * myURL.port = 'abcd';
622
- * console.log(myURL.port);
623
- * // Prints 1234
624
- *
625
- * // Leading numbers are treated as a port number
626
- * myURL.port = '5678abcd';
627
- * console.log(myURL.port);
628
- * // Prints 5678
629
- *
630
- * // Non-integers are truncated
631
- * myURL.port = 1234.5678;
632
- * console.log(myURL.port);
633
- * // Prints 1234
634
- *
635
- * // Out-of-range numbers which are not represented in scientific notation
636
- * // will be ignored.
637
- * myURL.port = 1e10; // 10000000000, will be range-checked as described below
638
- * console.log(myURL.port);
639
- * // Prints 1234
640
- * ```
641
- *
642
- * Numbers which contain a decimal point,
643
- * such as floating-point numbers or numbers in scientific notation,
644
- * are not an exception to this rule.
645
- * Leading numbers up to the decimal point will be set as the URL's port,
646
- * assuming they are valid:
647
- *
648
- * ```js
649
- * myURL.port = 4.567e21;
650
- * console.log(myURL.port);
651
- * // Prints 4 (because it is the leading number in the string '4.567e21')
652
- * ```
653
- */
654
- port: string;
655
- /**
656
- * Gets and sets the protocol portion of the URL.
657
- *
658
- * ```js
659
- * const myURL = new URL('https://example.org');
660
- * console.log(myURL.protocol);
661
- * // Prints https:
662
- *
663
- * myURL.protocol = 'ftp';
664
- * console.log(myURL.href);
665
- * // Prints ftp://example.org/
666
- * ```
667
- *
668
- * Invalid URL protocol values assigned to the `protocol` property are ignored.
669
- */
670
- protocol: string;
671
- /**
672
- * Gets and sets the serialized query portion of the URL.
673
- *
674
- * ```js
675
- * const myURL = new URL('https://example.org/abc?123');
676
- * console.log(myURL.search);
677
- * // Prints ?123
678
- *
679
- * myURL.search = 'abc=xyz';
680
- * console.log(myURL.href);
681
- * // Prints https://example.org/abc?abc=xyz
682
- * ```
683
- *
684
- * Any invalid URL characters appearing in the value assigned the `search` property will be `percent-encoded`. The selection of which
685
- * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
686
- */
687
- search: string;
688
- /**
689
- * Gets the `URLSearchParams` object representing the query parameters of the
690
- * URL. This property is read-only but the `URLSearchParams` object it provides
691
- * can be used to mutate the URL instance; to replace the entirety of query
692
- * parameters of the URL, use the {@link search} setter. See `URLSearchParams` documentation for details.
693
- *
694
- * Use care when using `.searchParams` to modify the `URL` because,
695
- * per the WHATWG specification, the `URLSearchParams` object uses
696
- * different rules to determine which characters to percent-encode. For
697
- * instance, the `URL` object will not percent encode the ASCII tilde (`~`)
698
- * character, while `URLSearchParams` will always encode it:
699
- *
700
- * ```js
701
- * const myURL = new URL('https://example.org/abc?foo=~bar');
702
- *
703
- * console.log(myURL.search); // prints ?foo=~bar
704
- *
705
- * // Modify the URL via searchParams...
706
- * myURL.searchParams.sort();
707
- *
708
- * console.log(myURL.search); // prints ?foo=%7Ebar
709
- * ```
710
- */
711
- readonly searchParams: URLSearchParams;
712
- /**
713
- * Gets and sets the username portion of the URL.
714
- *
715
- * ```js
716
- * const myURL = new URL('https://abc:xyz@example.com');
717
- * console.log(myURL.username);
718
- * // Prints abc
719
- *
720
- * myURL.username = '123';
721
- * console.log(myURL.href);
722
- * // Prints https://123:xyz@example.com/
723
- * ```
724
- *
725
- * Any invalid URL characters appearing in the value assigned the `username` property will be `percent-encoded`. The selection of which
726
- * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
727
- */
728
- username: string;
729
- /**
730
- * The `toString()` method on the `URL` object returns the serialized URL. The
731
- * value returned is equivalent to that of {@link href} and {@link toJSON}.
732
- */
733
- toString(): string;
734
- /**
735
- * The `toJSON()` method on the `URL` object returns the serialized URL. The
736
- * value returned is equivalent to that of {@link href} and {@link toString}.
737
- *
738
- * This method is automatically called when an `URL` object is serialized
739
- * with [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify).
740
- *
741
- * ```js
742
- * const myURLs = [
743
- * new URL('https://www.example.com'),
744
- * new URL('https://test.example.org'),
745
- * ];
746
- * console.log(JSON.stringify(myURLs));
747
- * // Prints ["https://www.example.com/","https://test.example.org/"]
748
- * ```
749
- */
750
- toJSON(): string;
751
- }
752
- interface URLSearchParamsIterator<T> extends NodeJS.Iterator<T, NodeJS.BuiltinIteratorReturn, unknown> {
753
- [Symbol.iterator](): URLSearchParamsIterator<T>;
754
- }
755
- /**
756
- * The `URLSearchParams` API provides read and write access to the query of a `URL`. The `URLSearchParams` class can also be used standalone with one of the
757
- * four following constructors.
758
- * The `URLSearchParams` class is also available on the global object.
759
- *
760
- * The WHATWG `URLSearchParams` interface and the `querystring` module have
761
- * similar purpose, but the purpose of the `querystring` module is more
762
- * general, as it allows the customization of delimiter characters (`&#x26;` and `=`).
763
- * On the other hand, this API is designed purely for URL query strings.
764
- *
765
- * ```js
766
- * const myURL = new URL('https://example.org/?abc=123');
767
- * console.log(myURL.searchParams.get('abc'));
768
- * // Prints 123
769
- *
770
- * myURL.searchParams.append('abc', 'xyz');
771
- * console.log(myURL.href);
772
- * // Prints https://example.org/?abc=123&#x26;abc=xyz
773
- *
774
- * myURL.searchParams.delete('abc');
775
- * myURL.searchParams.set('a', 'b');
776
- * console.log(myURL.href);
777
- * // Prints https://example.org/?a=b
778
- *
779
- * const newSearchParams = new URLSearchParams(myURL.searchParams);
780
- * // The above is equivalent to
781
- * // const newSearchParams = new URLSearchParams(myURL.search);
782
- *
783
- * newSearchParams.append('a', 'c');
784
- * console.log(myURL.href);
785
- * // Prints https://example.org/?a=b
786
- * console.log(newSearchParams.toString());
787
- * // Prints a=b&#x26;a=c
788
- *
789
- * // newSearchParams.toString() is implicitly called
790
- * myURL.search = newSearchParams;
791
- * console.log(myURL.href);
792
- * // Prints https://example.org/?a=b&#x26;a=c
793
- * newSearchParams.delete('a');
794
- * console.log(myURL.href);
795
- * // Prints https://example.org/?a=b&#x26;a=c
796
- * ```
797
- * @since v7.5.0, v6.13.0
798
- */
799
- class URLSearchParams implements Iterable<[string, string]> {
800
- constructor(
801
- init?:
802
- | URLSearchParams
803
- | string
804
- | Record<string, string | readonly string[]>
805
- | Iterable<[string, string]>
806
- | ReadonlyArray<[string, string]>,
807
- );
808
- /**
809
- * Append a new name-value pair to the query string.
810
- */
811
- append(name: string, value: string): void;
812
- /**
813
- * If `value` is provided, removes all name-value pairs
814
- * where name is `name` and value is `value`.
815
- *
816
- * If `value` is not provided, removes all name-value pairs whose name is `name`.
817
- */
818
- delete(name: string, value?: string): void;
819
- /**
820
- * Returns an ES6 `Iterator` over each of the name-value pairs in the query.
821
- * Each item of the iterator is a JavaScript `Array`. The first item of the `Array` is the `name`, the second item of the `Array` is the `value`.
822
- *
823
- * Alias for `urlSearchParams[@@iterator]()`.
824
- */
825
- entries(): URLSearchParamsIterator<[string, string]>;
826
- /**
827
- * Iterates over each name-value pair in the query and invokes the given function.
828
- *
829
- * ```js
830
- * const myURL = new URL('https://example.org/?a=b&#x26;c=d');
831
- * myURL.searchParams.forEach((value, name, searchParams) => {
832
- * console.log(name, value, myURL.searchParams === searchParams);
833
- * });
834
- * // Prints:
835
- * // a b true
836
- * // c d true
837
- * ```
838
- * @param fn Invoked for each name-value pair in the query
839
- * @param thisArg To be used as `this` value for when `fn` is called
840
- */
841
- forEach<TThis = this>(
842
- fn: (this: TThis, value: string, name: string, searchParams: URLSearchParams) => void,
843
- thisArg?: TThis,
844
- ): void;
845
- /**
846
- * Returns the value of the first name-value pair whose name is `name`. If there
847
- * are no such pairs, `null` is returned.
848
- * @return or `null` if there is no name-value pair with the given `name`.
849
- */
850
- get(name: string): string | null;
851
- /**
852
- * Returns the values of all name-value pairs whose name is `name`. If there are
853
- * no such pairs, an empty array is returned.
854
- */
855
- getAll(name: string): string[];
856
- /**
857
- * Checks if the `URLSearchParams` object contains key-value pair(s) based on `name` and an optional `value` argument.
858
- *
859
- * If `value` is provided, returns `true` when name-value pair with
860
- * same `name` and `value` exists.
861
- *
862
- * If `value` is not provided, returns `true` if there is at least one name-value
863
- * pair whose name is `name`.
864
- */
865
- has(name: string, value?: string): boolean;
866
- /**
867
- * Returns an ES6 `Iterator` over the names of each name-value pair.
868
- *
869
- * ```js
870
- * const params = new URLSearchParams('foo=bar&#x26;foo=baz');
871
- * for (const name of params.keys()) {
872
- * console.log(name);
873
- * }
874
- * // Prints:
875
- * // foo
876
- * // foo
877
- * ```
878
- */
879
- keys(): URLSearchParamsIterator<string>;
880
- /**
881
- * Sets the value in the `URLSearchParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`,
882
- * set the first such pair's value to `value` and remove all others. If not,
883
- * append the name-value pair to the query string.
884
- *
885
- * ```js
886
- * const params = new URLSearchParams();
887
- * params.append('foo', 'bar');
888
- * params.append('foo', 'baz');
889
- * params.append('abc', 'def');
890
- * console.log(params.toString());
891
- * // Prints foo=bar&#x26;foo=baz&#x26;abc=def
892
- *
893
- * params.set('foo', 'def');
894
- * params.set('xyz', 'opq');
895
- * console.log(params.toString());
896
- * // Prints foo=def&#x26;abc=def&#x26;xyz=opq
897
- * ```
898
- */
899
- set(name: string, value: string): void;
900
- /**
901
- * The total number of parameter entries.
902
- * @since v19.8.0
903
- */
904
- readonly size: number;
905
- /**
906
- * Sort all existing name-value pairs in-place by their names. Sorting is done
907
- * with a [stable sorting algorithm](https://en.wikipedia.org/wiki/Sorting_algorithm#Stability), so relative order between name-value pairs
908
- * with the same name is preserved.
909
- *
910
- * This method can be used, in particular, to increase cache hits.
911
- *
912
- * ```js
913
- * const params = new URLSearchParams('query[]=abc&#x26;type=search&#x26;query[]=123');
914
- * params.sort();
915
- * console.log(params.toString());
916
- * // Prints query%5B%5D=abc&#x26;query%5B%5D=123&#x26;type=search
917
- * ```
918
- * @since v7.7.0, v6.13.0
919
- */
920
- sort(): void;
921
- /**
922
- * Returns the search parameters serialized as a string, with characters
923
- * percent-encoded where necessary.
924
- */
925
- toString(): string;
926
- /**
927
- * Returns an ES6 `Iterator` over the values of each name-value pair.
928
- */
929
- values(): URLSearchParamsIterator<string>;
930
- [Symbol.iterator](): URLSearchParamsIterator<[string, string]>;
931
- }
932
- import { URL as _URL, URLSearchParams as _URLSearchParams } from "url";
933
- global {
934
- interface URLSearchParams extends _URLSearchParams {}
935
- interface URL extends _URL {}
936
- interface Global {
937
- URL: typeof _URL;
938
- URLSearchParams: typeof _URLSearchParams;
939
- }
940
- /**
941
- * `URL` class is a global reference for `import { URL } from 'node:url'`
942
- * https://nodejs.org/api/url.html#the-whatwg-url-api
943
- * @since v10.0.0
944
- */
945
- var URL: typeof globalThis extends {
946
- onmessage: any;
947
- URL: infer T;
948
- } ? T
949
- : typeof _URL;
950
- /**
951
- * `URLSearchParams` class is a global reference for `import { URLSearchParams } from 'node:url'`
952
- * https://nodejs.org/api/url.html#class-urlsearchparams
953
- * @since v10.0.0
954
- */
955
- var URLSearchParams: typeof globalThis extends {
956
- onmessage: any;
957
- URLSearchParams: infer T;
958
- } ? T
959
- : typeof _URLSearchParams;
960
- }
961
- }
962
- declare module "node:url" {
963
- export * from "url";
964
- }