@types/node 16.4.8 → 16.4.12
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 +2 -2
- node/assert.d.ts +3 -0
- node/buffer.d.ts +62 -62
- node/cluster.d.ts +1 -1
- node/crypto.d.ts +11 -1
- node/dns/promises.d.ts +1 -1
- node/dns.d.ts +3 -3
- node/fs/promises.d.ts +11 -7
- node/fs.d.ts +21 -11
- node/http.d.ts +72 -9
- node/http2.d.ts +1 -1
- node/https.d.ts +104 -1
- node/index.d.ts +1 -0
- node/net.d.ts +15 -6
- node/os.d.ts +2 -2
- node/package.json +7 -2
- node/process.d.ts +2 -2
- node/querystring.d.ts +4 -4
- node/stream.d.ts +1 -1
- node/timers/promises.d.ts +1 -1
- node/tls.d.ts +1 -1
- node/tty.d.ts +3 -3
- node/url.d.ts +4 -4
- node/util.d.ts +1 -1
node/querystring.d.ts
CHANGED
|
@@ -54,8 +54,8 @@ declare module 'querystring' {
|
|
|
54
54
|
* ```
|
|
55
55
|
* @since v0.1.25
|
|
56
56
|
* @param obj The object to serialize into a URL query string
|
|
57
|
-
* @param sep The substring used to delimit key and value pairs in the query string.
|
|
58
|
-
* @param eq . The substring used to delimit keys and values in the query string.
|
|
57
|
+
* @param [sep='&'] The substring used to delimit key and value pairs in the query string.
|
|
58
|
+
* @param [eq='='] . The substring used to delimit keys and values in the query string.
|
|
59
59
|
*/
|
|
60
60
|
function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string;
|
|
61
61
|
/**
|
|
@@ -87,8 +87,8 @@ declare module 'querystring' {
|
|
|
87
87
|
* ```
|
|
88
88
|
* @since v0.1.25
|
|
89
89
|
* @param str The URL query string to parse
|
|
90
|
-
* @param sep The substring used to delimit key and value pairs in the query string.
|
|
91
|
-
* @param eq . The substring used to delimit keys and values in the query string.
|
|
90
|
+
* @param [sep='&'] The substring used to delimit key and value pairs in the query string.
|
|
91
|
+
* @param [eq='='] . The substring used to delimit keys and values in the query string.
|
|
92
92
|
*/
|
|
93
93
|
function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery;
|
|
94
94
|
/**
|
node/stream.d.ts
CHANGED
|
@@ -587,7 +587,7 @@ declare module 'stream' {
|
|
|
587
587
|
* @since v0.9.4
|
|
588
588
|
* @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a string, `Buffer` or `Uint8Array`. For object mode streams, `chunk` may be any
|
|
589
589
|
* JavaScript value other than `null`.
|
|
590
|
-
* @param encoding The encoding, if `chunk` is a string.
|
|
590
|
+
* @param [encoding='utf8'] The encoding, if `chunk` is a string.
|
|
591
591
|
* @param callback Callback for when this chunk of data is flushed.
|
|
592
592
|
* @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
|
593
593
|
*/
|
node/timers/promises.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ declare module 'timers/promises' {
|
|
|
42
42
|
* });
|
|
43
43
|
* ```
|
|
44
44
|
* @since v15.0.0
|
|
45
|
-
* @param delay The number of milliseconds to wait before fulfilling the promise.
|
|
45
|
+
* @param [delay=1] The number of milliseconds to wait before fulfilling the promise.
|
|
46
46
|
* @param value A value with which the promise is fulfilled.
|
|
47
47
|
*/
|
|
48
48
|
function setTimeout<T = void>(delay?: number, value?: T, options?: TimerOptions): Promise<T>;
|
node/tls.d.ts
CHANGED
|
@@ -328,7 +328,7 @@ declare module 'tls' {
|
|
|
328
328
|
* smaller fragments add extra TLS framing bytes and CPU overhead, which may
|
|
329
329
|
* decrease overall server throughput.
|
|
330
330
|
* @since v0.11.11
|
|
331
|
-
* @param size The maximum TLS fragment size. The maximum value is `16384`.
|
|
331
|
+
* @param [size=16384] The maximum TLS fragment size. The maximum value is `16384`.
|
|
332
332
|
*/
|
|
333
333
|
setMaxSendFragment(size: number): boolean;
|
|
334
334
|
/**
|
node/tty.d.ts
CHANGED
|
@@ -149,7 +149,7 @@ declare module 'tty' {
|
|
|
149
149
|
*
|
|
150
150
|
* Disabling color support is also possible by using the `NO_COLOR` and`NODE_DISABLE_COLORS` environment variables.
|
|
151
151
|
* @since v9.9.0
|
|
152
|
-
* @param env An object containing the environment variables to check. This enables simulating the usage of a specific terminal.
|
|
152
|
+
* @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal.
|
|
153
153
|
*/
|
|
154
154
|
getColorDepth(env?: object): number;
|
|
155
155
|
/**
|
|
@@ -169,8 +169,8 @@ declare module 'tty' {
|
|
|
169
169
|
* // Returns false (the environment setting pretends to support 2 ** 8 colors).
|
|
170
170
|
* ```
|
|
171
171
|
* @since v11.13.0, v10.16.0
|
|
172
|
-
* @param count The number of colors that are requested (minimum 2).
|
|
173
|
-
* @param env An object containing the environment variables to check. This enables simulating the usage of a specific terminal.
|
|
172
|
+
* @param [count=16] The number of colors that are requested (minimum 2).
|
|
173
|
+
* @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal.
|
|
174
174
|
*/
|
|
175
175
|
hasColors(count?: number): boolean;
|
|
176
176
|
hasColors(env?: object): boolean;
|
node/url.d.ts
CHANGED
|
@@ -65,10 +65,10 @@ declare module 'url' {
|
|
|
65
65
|
* @since v0.1.25
|
|
66
66
|
* @deprecated Legacy: Use the WHATWG URL API instead.
|
|
67
67
|
* @param urlString The URL string to parse.
|
|
68
|
-
* @param parseQueryString 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
|
|
69
|
-
* returned URL object will be an unparsed, undecoded string.
|
|
70
|
-
* @param slashesDenoteHost 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
|
|
71
|
-
* would be `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`.
|
|
68
|
+
* @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
|
|
69
|
+
* on the returned URL object will be an unparsed, undecoded string.
|
|
70
|
+
* @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
|
|
71
|
+
* result would be `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`.
|
|
72
72
|
*/
|
|
73
73
|
function parse(urlString: string): UrlWithStringQuery;
|
|
74
74
|
function parse(urlString: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
|
node/util.d.ts
CHANGED
|
@@ -1038,7 +1038,7 @@ declare module 'util' {
|
|
|
1038
1038
|
/**
|
|
1039
1039
|
* UTF-8 encodes the `input` string and returns a `Uint8Array` containing the
|
|
1040
1040
|
* encoded bytes.
|
|
1041
|
-
* @param input The text to encode.
|
|
1041
|
+
* @param [input='an empty string'] The text to encode.
|
|
1042
1042
|
*/
|
|
1043
1043
|
encode(input?: string): Uint8Array;
|
|
1044
1044
|
/**
|