@types/node 16.11.0 → 16.11.1
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.
- node/README.md +1 -1
- node/package.json +2 -2
- node/url.d.ts +24 -1
node/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Sun, 17 Oct 2021 04:01:18 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
|
|
14
14
|
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "16.11.
|
|
3
|
+
"version": "16.11.1",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -225,6 +225,6 @@
|
|
|
225
225
|
},
|
|
226
226
|
"scripts": {},
|
|
227
227
|
"dependencies": {},
|
|
228
|
-
"typesPublisherContentHash": "
|
|
228
|
+
"typesPublisherContentHash": "ff17ac1347ef82ac3f00b3e6266533bf928948b2bdb61a2c5dfe7751c2b729f9",
|
|
229
229
|
"typeScriptVersion": "3.7"
|
|
230
230
|
}
|
node/url.d.ts
CHANGED
|
@@ -71,6 +71,30 @@ declare module 'url' {
|
|
|
71
71
|
function parse(urlString: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
|
|
72
72
|
function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
|
|
73
73
|
function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
|
|
74
|
+
/**
|
|
75
|
+
* The URL object has both a `toString()` method and `href` property that return string serializations of the URL.
|
|
76
|
+
* These are not, however, customizable in any way. The `url.format(URL[, options])` method allows for basic
|
|
77
|
+
* customization of the output.
|
|
78
|
+
* Returns a customizable serialization of a URL `String` representation of a `WHATWG URL` object.
|
|
79
|
+
*
|
|
80
|
+
* ```js
|
|
81
|
+
* import url from 'url';
|
|
82
|
+
* const myURL = new URL('https://a:b@測試?abc#foo');
|
|
83
|
+
*
|
|
84
|
+
* console.log(myURL.href);
|
|
85
|
+
* // Prints https://a:b@xn--g6w251d/?abc#foo
|
|
86
|
+
*
|
|
87
|
+
* console.log(myURL.toString());
|
|
88
|
+
* // Prints https://a:b@xn--g6w251d/?abc#foo
|
|
89
|
+
*
|
|
90
|
+
* console.log(url.format(myURL, { fragment: false, unicode: true, auth: false }));
|
|
91
|
+
* // Prints 'https://測試/?abc'
|
|
92
|
+
* ```
|
|
93
|
+
* @since v7.6.0
|
|
94
|
+
* @param urlObject A `WHATWG URL` object
|
|
95
|
+
* @param options
|
|
96
|
+
*/
|
|
97
|
+
function format(urlObject: URL, options?: URLFormatOptions): string;
|
|
74
98
|
/**
|
|
75
99
|
* The `url.format()` method returns a formatted URL string derived from`urlObject`.
|
|
76
100
|
*
|
|
@@ -134,7 +158,6 @@ declare module 'url' {
|
|
|
134
158
|
* @deprecated Legacy: Use the WHATWG URL API instead.
|
|
135
159
|
* @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()`.
|
|
136
160
|
*/
|
|
137
|
-
function format(urlObject: URL, options?: URLFormatOptions): string;
|
|
138
161
|
function format(urlObject: UrlObject | string): string;
|
|
139
162
|
/**
|
|
140
163
|
* The `url.resolve()` method resolves a target URL relative to a base URL in a
|