@types/node 20.12.7 → 20.12.9

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/timers.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * The timer functions within Node.js implement a similar API as the timers API
7
7
  * provided by Web Browsers but use a different internal implementation that is
8
8
  * built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout).
9
- * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/timers.js)
9
+ * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/timers.js)
10
10
  */
11
11
  declare module "timers" {
12
12
  import { Abortable } from "node:events";
@@ -43,12 +43,12 @@ declare module "timers" {
43
43
  * actions.
44
44
  *
45
45
  * By default, when an immediate is scheduled, the Node.js event loop will continue
46
- * running as long as the immediate is active. The `Immediate` object returned by `setImmediate()` exports both `immediate.ref()` and `immediate.unref()`functions that can be used to
46
+ * running as long as the immediate is active. The `Immediate` object returned by `setImmediate()` exports both `immediate.ref()` and `immediate.unref()` functions that can be used to
47
47
  * control this default behavior.
48
48
  */
49
49
  class Immediate implements RefCounted {
50
50
  /**
51
- * When called, requests that the Node.js event loop _not_ exit so long as the`Immediate` is active. Calling `immediate.ref()` multiple times will have no
51
+ * When called, requests that the Node.js event loop _not_ exit so long as the `Immediate` is active. Calling `immediate.ref()` multiple times will have no
52
52
  * effect.
53
53
  *
54
54
  * By default, all `Immediate` objects are "ref'ed", making it normally unnecessary
@@ -100,7 +100,7 @@ declare module "timers" {
100
100
  /**
101
101
  * When called, the active `Timeout` object will not require the Node.js event loop
102
102
  * to remain active. If there is no other activity keeping the event loop running,
103
- * the process may exit before the `Timeout` object's callback is invoked. Calling`timeout.unref()` multiple times will have no effect.
103
+ * the process may exit before the `Timeout` object's callback is invoked. Calling `timeout.unref()` multiple times will have no effect.
104
104
  * @since v0.9.1
105
105
  * @return a reference to `timeout`
106
106
  */
@@ -138,7 +138,7 @@ declare module "timers" {
138
138
  * nor of their ordering. The callback will be called as close as possible to the
139
139
  * time specified.
140
140
  *
141
- * When `delay` is larger than `2147483647` or less than `1`, the `delay`will be set to `1`. Non-integer delays are truncated to an integer.
141
+ * When `delay` is larger than `2147483647` or less than `1`, the `delay` will be set to `1`. Non-integer delays are truncated to an integer.
142
142
  *
143
143
  * If `callback` is not a function, a `TypeError` will be thrown.
144
144
  *
node/tls.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * ```js
7
7
  * const tls = require('node:tls');
8
8
  * ```
9
- * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/tls.js)
9
+ * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/tls.js)
10
10
  */
11
11
  declare module "tls" {
12
12
  import { X509Certificate } from "node:crypto";
@@ -125,7 +125,7 @@ declare module "tls" {
125
125
  */
126
126
  asn1Curve?: string;
127
127
  /**
128
- * The NIST name for the elliptic curve,if it has one
128
+ * The NIST name for the elliptic curve, if it has one
129
129
  * (not all well-known curves have been assigned names by NIST).
130
130
  */
131
131
  nistCurve?: string;
@@ -278,7 +278,7 @@ declare module "tls" {
278
278
  * an ephemeral key exchange in `perfect forward secrecy` on a client
279
279
  * connection. It returns an empty object when the key exchange is not
280
280
  * ephemeral. As this is only supported on a client socket; `null` is returned
281
- * if called on a server socket. The supported types are `'DH'` and `'ECDH'`. The`name` property is available only when type is `'ECDH'`.
281
+ * if called on a server socket. The supported types are `'DH'` and `'ECDH'`. The `name` property is available only when type is `'ECDH'`.
282
282
  *
283
283
  * For example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`.
284
284
  * @since v5.0.0
@@ -382,7 +382,7 @@ declare module "tls" {
382
382
  * This method can be used to request a peer's certificate after the secure
383
383
  * connection has been established.
384
384
  *
385
- * When running as the server, the socket will be destroyed with an error after`handshakeTimeout` timeout.
385
+ * When running as the server, the socket will be destroyed with an error after `handshakeTimeout` timeout.
386
386
  *
387
387
  * For TLSv1.3, renegotiation cannot be initiated, it is not supported by the
388
388
  * protocol.
@@ -975,7 +975,7 @@ declare module "tls" {
975
975
  * This function is intended to be used in combination with the`checkServerIdentity` option that can be passed to {@link connect} and as
976
976
  * such operates on a `certificate object`. For other purposes, consider using `x509.checkHost()` instead.
977
977
  *
978
- * This function can be overwritten by providing an alternative function as the`options.checkServerIdentity` option that is passed to `tls.connect()`. The
978
+ * This function can be overwritten by providing an alternative function as the `options.checkServerIdentity` option that is passed to `tls.connect()`. The
979
979
  * overwriting function can call `tls.checkServerIdentity()` of course, to augment
980
980
  * the checks done with additional verification.
981
981
  *
@@ -984,7 +984,7 @@ declare module "tls" {
984
984
  *
985
985
  * Earlier versions of Node.js incorrectly accepted certificates for a given`hostname` if a matching `uniformResourceIdentifier` subject alternative name
986
986
  * was present (see [CVE-2021-44531](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531)). Applications that wish to accept`uniformResourceIdentifier` subject alternative names can use
987
- * a custom`options.checkServerIdentity` function that implements the desired behavior.
987
+ * a custom `options.checkServerIdentity` function that implements the desired behavior.
988
988
  * @since v0.8.4
989
989
  * @param hostname The host name or IP address to verify the certificate against.
990
990
  * @param cert A `certificate object` representing the peer's certificate.
@@ -1092,7 +1092,7 @@ declare module "tls" {
1092
1092
  * stream and the cleartext one is used as a replacement for the initial encrypted
1093
1093
  * stream.
1094
1094
  *
1095
- * `tls.createSecurePair()` returns a `tls.SecurePair` object with `cleartext` and`encrypted` stream properties.
1095
+ * `tls.createSecurePair()` returns a `tls.SecurePair` object with `cleartext` and `encrypted` stream properties.
1096
1096
  *
1097
1097
  * Using `cleartext` has the same API as {@link TLSSocket}.
1098
1098
  *
@@ -1125,10 +1125,10 @@ declare module "tls" {
1125
1125
  rejectUnauthorized?: boolean,
1126
1126
  ): SecurePair;
1127
1127
  /**
1128
- * {@link createServer} sets the default value of the `honorCipherOrder` option
1128
+ * `{@link createServer}` sets the default value of the `honorCipherOrder` option
1129
1129
  * to `true`, other APIs that create secure contexts leave it unset.
1130
1130
  *
1131
- * {@link createServer} uses a 128 bit truncated SHA1 hash value generated
1131
+ * `{@link createServer}` uses a 128 bit truncated SHA1 hash value generated
1132
1132
  * from `process.argv` as the default value of the `sessionIdContext` option, other
1133
1133
  * APIs that create secure contexts have no default value.
1134
1134
  *
@@ -1136,12 +1136,12 @@ declare module "tls" {
1136
1136
  * usable as an argument to several `tls` APIs, such as `server.addContext()`,
1137
1137
  * but has no public methods. The {@link Server} constructor and the {@link createServer} method do not support the `secureContext` option.
1138
1138
  *
1139
- * A key is _required_ for ciphers that use certificates. Either `key` or`pfx` can be used to provide it.
1139
+ * A key is _required_ for ciphers that use certificates. Either `key` or `pfx` can be used to provide it.
1140
1140
  *
1141
1141
  * If the `ca` option is not given, then Node.js will default to using [Mozilla's publicly trusted list of
1142
1142
  * CAs](https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt).
1143
1143
  *
1144
- * Custom DHE parameters are discouraged in favor of the new `dhparam: 'auto'`option. When set to `'auto'`, well-known DHE parameters of sufficient strength
1144
+ * Custom DHE parameters are discouraged in favor of the new `dhparam: 'auto' `option. When set to `'auto'`, well-known DHE parameters of sufficient strength
1145
1145
  * will be selected automatically. Otherwise, if necessary, `openssl dhparam` can
1146
1146
  * be used to create custom parameters. The key length must be greater than or
1147
1147
  * equal to 1024 bits or else an error will be thrown. Although 1024 bits is
@@ -1152,9 +1152,10 @@ declare module "tls" {
1152
1152
  /**
1153
1153
  * Returns an array with the names of the supported TLS ciphers. The names are
1154
1154
  * lower-case for historical reasons, but must be uppercased to be used in
1155
- * the `ciphers` option of {@link createSecureContext}.
1155
+ * the `ciphers` option of `{@link createSecureContext}`.
1156
1156
  *
1157
- * Not all supported ciphers are enabled by default. See `Modifying the default TLS cipher suite`.
1157
+ * Not all supported ciphers are enabled by default. See
1158
+ * [Modifying the default TLS cipher suite](https://nodejs.org/docs/latest-v20.x/api/tls.html#modifying-the-default-tls-cipher-suite).
1158
1159
  *
1159
1160
  * Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for
1160
1161
  * TLSv1.2 and below.
@@ -1167,41 +1168,47 @@ declare module "tls" {
1167
1168
  function getCiphers(): string[];
1168
1169
  /**
1169
1170
  * The default curve name to use for ECDH key agreement in a tls server.
1170
- * The default value is 'auto'. See tls.createSecureContext() for further
1171
+ * The default value is `'auto'`. See `{@link createSecureContext()}` for further
1171
1172
  * information.
1173
+ * @since v0.11.13
1172
1174
  */
1173
1175
  let DEFAULT_ECDH_CURVE: string;
1174
1176
  /**
1175
- * The default value of the maxVersion option of
1176
- * tls.createSecureContext(). It can be assigned any of the supported TLS
1177
- * protocol versions, 'TLSv1.3', 'TLSv1.2', 'TLSv1.1', or 'TLSv1'. Default:
1178
- * 'TLSv1.3', unless changed using CLI options. Using --tls-max-v1.2 sets
1179
- * the default to 'TLSv1.2'. Using --tls-max-v1.3 sets the default to
1180
- * 'TLSv1.3'. If multiple of the options are provided, the highest maximum
1181
- * is used.
1177
+ * The default value of the `maxVersion` option of `{@link createSecureContext()}`.
1178
+ * It can be assigned any of the supported TLS protocol versions,
1179
+ * `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. **Default:** `'TLSv1.3'`, unless
1180
+ * changed using CLI options. Using `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using
1181
+ * `--tls-max-v1.3` sets the default to `'TLSv1.3'`. If multiple of the options
1182
+ * are provided, the highest maximum is used.
1183
+ * @since v11.4.0
1182
1184
  */
1183
1185
  let DEFAULT_MAX_VERSION: SecureVersion;
1184
1186
  /**
1185
- * The default value of the minVersion option of tls.createSecureContext().
1187
+ * The default value of the `minVersion` option of `{@link createSecureContext()}`.
1186
1188
  * It can be assigned any of the supported TLS protocol versions,
1187
- * 'TLSv1.3', 'TLSv1.2', 'TLSv1.1', or 'TLSv1'. Default: 'TLSv1.2', unless
1188
- * changed using CLI options. Using --tls-min-v1.0 sets the default to
1189
- * 'TLSv1'. Using --tls-min-v1.1 sets the default to 'TLSv1.1'. Using
1190
- * --tls-min-v1.3 sets the default to 'TLSv1.3'. If multiple of the options
1189
+ * `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. **Default:** `'TLSv1.2'`, unless
1190
+ * changed using CLI options. Using `--tls-min-v1.0` sets the default to
1191
+ * `'TLSv1'`. Using `--tls-min-v1.1` sets the default to `'TLSv1.1'`. Using
1192
+ * `--tls-min-v1.3` sets the default to `'TLSv1.3'`. If multiple of the options
1191
1193
  * are provided, the lowest minimum is used.
1194
+ * @since v11.4.0
1192
1195
  */
1193
1196
  let DEFAULT_MIN_VERSION: SecureVersion;
1194
1197
  /**
1195
- * The default value of the ciphers option of tls.createSecureContext().
1198
+ * The default value of the `ciphers` option of `{@link createSecureContext()}`.
1196
1199
  * It can be assigned any of the supported OpenSSL ciphers.
1197
- * Defaults to the content of crypto.constants.defaultCoreCipherList, unless
1198
- * changed using CLI options using --tls-default-ciphers.
1200
+ * Defaults to the content of `crypto.constants.defaultCoreCipherList`, unless
1201
+ * changed using CLI options using `--tls-default-ciphers`.
1202
+ * @since v19.8.0
1199
1203
  */
1200
1204
  let DEFAULT_CIPHERS: string;
1201
1205
  /**
1202
- * An immutable array of strings representing the root certificates (in PEM
1203
- * format) used for verifying peer certificates. This is the default value
1204
- * of the ca option to tls.createSecureContext().
1206
+ * An immutable array of strings representing the root certificates (in PEM format)
1207
+ * from the bundled Mozilla CA store as supplied by the current Node.js version.
1208
+ *
1209
+ * The bundled CA store, as supplied by Node.js, is a snapshot of Mozilla CA store
1210
+ * that is fixed at release time. It is identical on all supported platforms.
1211
+ * @since v12.3.0
1205
1212
  */
1206
1213
  const rootCertificates: readonly string[];
1207
1214
  }
node/trace_events.d.ts CHANGED
@@ -1,40 +1,36 @@
1
1
  /**
2
- * The `node:trace_events` module provides a mechanism to centralize tracing
3
- * information generated by V8, Node.js core, and userspace code.
2
+ * The `node:trace_events` module provides a mechanism to centralize tracing information
3
+ * generated by V8, Node.js core, and userspace code.
4
4
  *
5
5
  * Tracing can be enabled with the `--trace-event-categories` command-line flag
6
- * or by using the `node:trace_events` module. The `--trace-event-categories` flag
6
+ * or by using the `trace_events` module. The `--trace-event-categories` flag
7
7
  * accepts a list of comma-separated category names.
8
8
  *
9
9
  * The available categories are:
10
10
  *
11
11
  * * `node`: An empty placeholder.
12
- * * `node.async_hooks`: Enables capture of detailed `async_hooks` trace data.
13
- * The `async_hooks` events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property.
12
+ * * `node.async_hooks`: Enables capture of detailed [`async_hooks`](https://nodejs.org/docs/latest-v20.x/api/async_hooks.html) trace data.
13
+ * The [`async_hooks`](https://nodejs.org/docs/latest-v20.x/api/async_hooks.html) events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property.
14
14
  * * `node.bootstrap`: Enables capture of Node.js bootstrap milestones.
15
- * * `node.console`: Enables capture of `console.time()` and `console.count()`output.
16
- * * `node.threadpoolwork.sync`: Enables capture of trace data for threadpool
17
- * synchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`.
18
- * * `node.threadpoolwork.async`: Enables capture of trace data for threadpool
19
- * asynchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`.
15
+ * * `node.console`: Enables capture of `console.time()` and `console.count()` output.
16
+ * * `node.threadpoolwork.sync`: Enables capture of trace data for threadpool synchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`.
17
+ * * `node.threadpoolwork.async`: Enables capture of trace data for threadpool asynchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`.
20
18
  * * `node.dns.native`: Enables capture of trace data for DNS queries.
21
19
  * * `node.net.native`: Enables capture of trace data for network.
22
20
  * * `node.environment`: Enables capture of Node.js Environment milestones.
23
21
  * * `node.fs.sync`: Enables capture of trace data for file system sync methods.
24
- * * `node.fs_dir.sync`: Enables capture of trace data for file system sync
25
- * directory methods.
22
+ * * `node.fs_dir.sync`: Enables capture of trace data for file system sync directory methods.
26
23
  * * `node.fs.async`: Enables capture of trace data for file system async methods.
27
- * * `node.fs_dir.async`: Enables capture of trace data for file system async
28
- * directory methods.
29
- * * `node.perf`: Enables capture of `Performance API` measurements.
24
+ * * `node.fs_dir.async`: Enables capture of trace data for file system async directory methods.
25
+ * * `node.perf`: Enables capture of [Performance API](https://nodejs.org/docs/latest-v20.x/api/perf_hooks.html) measurements.
30
26
  * * `node.perf.usertiming`: Enables capture of only Performance API User Timing
31
27
  * measures and marks.
32
28
  * * `node.perf.timerify`: Enables capture of only Performance API timerify
33
29
  * measurements.
34
30
  * * `node.promises.rejections`: Enables capture of trace data tracking the number
35
31
  * of unhandled Promise rejections and handled-after-rejections.
36
- * * `node.vm.script`: Enables capture of trace data for the `node:vm` module's`runInNewContext()`, `runInContext()`, and `runInThisContext()` methods.
37
- * * `v8`: The `V8` events are GC, compiling, and execution related.
32
+ * * `node.vm.script`: Enables capture of trace data for the `node:vm` module's `runInNewContext()`, `runInContext()`, and `runInThisContext()` methods.
33
+ * * `v8`: The [V8](https://nodejs.org/docs/latest-v20.x/api/v8.html) events are GC, compiling, and execution related.
38
34
  * * `node.http`: Enables capture of trace data for http request / response.
39
35
  *
40
36
  * By default the `node`, `node.async_hooks`, and `v8` categories are enabled.
@@ -43,8 +39,8 @@
43
39
  * node --trace-event-categories v8,node,node.async_hooks server.js
44
40
  * ```
45
41
  *
46
- * Prior versions of Node.js required the use of the `--trace-events-enabled`flag to enable trace events. This requirement has been removed. However, the`--trace-events-enabled` flag _may_ still be
47
- * used and will enable the`node`, `node.async_hooks`, and `v8` trace event categories by default.
42
+ * Prior versions of Node.js required the use of the `--trace-events-enabled` flag to enable trace events. This requirement has been removed. However, the `--trace-events-enabled` flag _may_ still be
43
+ * used and will enable the `node`, `node.async_hooks`, and `v8` trace event categories by default.
48
44
  *
49
45
  * ```bash
50
46
  * node --trace-events-enabled
@@ -69,7 +65,7 @@
69
65
  * Running Node.js with tracing enabled will produce log files that can be opened
70
66
  * in the [`chrome://tracing`](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) tab of Chrome.
71
67
  *
72
- * The logging file is by default called `node_trace.${rotation}.log`, where`${rotation}` is an incrementing log-rotation id. The filepath pattern can
68
+ * The logging file is by default called `node_trace.${rotation}.log`, where `${rotation}` is an incrementing log-rotation id. The filepath pattern can
73
69
  * be specified with `--trace-event-file-pattern` that accepts a template
74
70
  * string that supports `${rotation}` and `${pid}`:
75
71
  *
@@ -77,7 +73,7 @@
77
73
  * node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js
78
74
  * ```
79
75
  *
80
- * To guarantee that the log file is properly generated after signal events like`SIGINT`, `SIGTERM`, or `SIGBREAK`, make sure to have the appropriate handlers
76
+ * To guarantee that the log file is properly generated after signal events like `SIGINT`, `SIGTERM`, or `SIGBREAK`, make sure to have the appropriate handlers
81
77
  * in your code, such as:
82
78
  *
83
79
  * ```js
@@ -92,9 +88,9 @@
92
88
  * However the trace-event timestamps are expressed in microseconds,
93
89
  * unlike `process.hrtime()` which returns nanoseconds.
94
90
  *
95
- * The features from this module are not available in `Worker` threads.
91
+ * The features from this module are not available in [`Worker`](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html#class-worker) threads.
96
92
  * @experimental
97
- * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/trace_events.js)
93
+ * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/trace_events.js)
98
94
  */
99
95
  declare module "trace_events" {
100
96
  /**
@@ -111,6 +107,7 @@ declare module "trace_events" {
111
107
  /**
112
108
  * A comma-separated list of the trace event categories covered by this
113
109
  * `Tracing` object.
110
+ * @since v10.0.0
114
111
  */
115
112
  readonly categories: string;
116
113
  /**
@@ -119,15 +116,34 @@ declare module "trace_events" {
119
116
  * Only trace event categories _not_ covered by other enabled `Tracing`
120
117
  * objects and _not_ specified by the `--trace-event-categories` flag
121
118
  * will be disabled.
119
+ *
120
+ * ```js
121
+ * const trace_events = require('node:trace_events');
122
+ * const t1 = trace_events.createTracing({ categories: ['node', 'v8'] });
123
+ * const t2 = trace_events.createTracing({ categories: ['node.perf', 'node'] });
124
+ * t1.enable();
125
+ * t2.enable();
126
+ *
127
+ * // Prints 'node,node.perf,v8'
128
+ * console.log(trace_events.getEnabledCategories());
129
+ *
130
+ * t2.disable(); // Will only disable emission of the 'node.perf' category
131
+ *
132
+ * // Prints 'node,v8'
133
+ * console.log(trace_events.getEnabledCategories());
134
+ * ```
135
+ * @since v10.0.0
122
136
  */
123
137
  disable(): void;
124
138
  /**
125
139
  * Enables this `Tracing` object for the set of categories covered by
126
140
  * the `Tracing` object.
141
+ * @since v10.0.0
127
142
  */
128
143
  enable(): void;
129
144
  /**
130
145
  * `true` only if the `Tracing` object has been enabled.
146
+ * @since v10.0.0
131
147
  */
132
148
  readonly enabled: boolean;
133
149
  }
@@ -151,7 +167,6 @@ declare module "trace_events" {
151
167
  * tracing.disable();
152
168
  * ```
153
169
  * @since v10.0.0
154
- * @return .
155
170
  */
156
171
  function createTracing(options: CreateTracingOptions): Tracing;
157
172
  /**
@@ -160,7 +175,7 @@ declare module "trace_events" {
160
175
  * by the _union_ of all currently-enabled `Tracing` objects and any categories
161
176
  * enabled using the `--trace-event-categories` flag.
162
177
  *
163
- * Given the file `test.js` below, the command`node --trace-event-categories node.perf test.js` will print`'node.async_hooks,node.perf'` to the console.
178
+ * Given the file `test.js` below, the command `node --trace-event-categories node.perf test.js` will print `'node.async_hooks,node.perf'` to the console.
164
179
  *
165
180
  * ```js
166
181
  * const trace_events = require('node:trace_events');
node/tty.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The `node:tty` module provides the `tty.ReadStream` and `tty.WriteStream`classes. In most cases, it will not be necessary or possible to use this module
2
+ * The `node:tty` module provides the `tty.ReadStream` and `tty.WriteStream` classes. In most cases, it will not be necessary or possible to use this module
3
3
  * directly. However, it can be accessed using:
4
4
  *
5
5
  * ```js
@@ -7,7 +7,7 @@
7
7
  * ```
8
8
  *
9
9
  * When Node.js detects that it is being run with a text terminal ("TTY")
10
- * attached, `process.stdin` will, by default, be initialized as an instance of`tty.ReadStream` and both `process.stdout` and `process.stderr` will, by
10
+ * attached, `process.stdin` will, by default, be initialized as an instance of `tty.ReadStream` and both `process.stdout` and `process.stderr` will, by
11
11
  * default, be instances of `tty.WriteStream`. The preferred method of determining
12
12
  * whether Node.js is being run within a TTY context is to check that the value of
13
13
  * the `process.stdout.isTTY` property is `true`:
@@ -20,8 +20,8 @@
20
20
  * ```
21
21
  *
22
22
  * In most cases, there should be little to no reason for an application to
23
- * manually create instances of the `tty.ReadStream` and `tty.WriteStream`classes.
24
- * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/tty.js)
23
+ * manually create instances of the `tty.ReadStream` and `tty.WriteStream` classes.
24
+ * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/tty.js)
25
25
  */
26
26
  declare module "tty" {
27
27
  import * as net from "node:net";
@@ -45,7 +45,7 @@ declare module "tty" {
45
45
  * raw device.
46
46
  *
47
47
  * This flag is always `false` when a process starts, even if the terminal is
48
- * operating in raw mode. Its value will change with subsequent calls to`setRawMode`.
48
+ * operating in raw mode. Its value will change with subsequent calls to `setRawMode`.
49
49
  * @since v0.7.7
50
50
  */
51
51
  isRaw: boolean;
@@ -76,7 +76,7 @@ declare module "tty" {
76
76
  */
77
77
  type Direction = -1 | 0 | 1;
78
78
  /**
79
- * Represents the writable side of a TTY. In normal circumstances,`process.stdout` and `process.stderr` will be the only`tty.WriteStream` instances created for a Node.js process and there
79
+ * Represents the writable side of a TTY. In normal circumstances, `process.stdout` and `process.stderr` will be the only`tty.WriteStream` instances created for a Node.js process and there
80
80
  * should be no reason to create additional instances.
81
81
  * @since v0.5.8
82
82
  */
@@ -149,7 +149,7 @@ declare module "tty" {
149
149
  * * 256 colors: `FORCE_COLOR = 2`
150
150
  * * 16,777,216 colors: `FORCE_COLOR = 3`
151
151
  *
152
- * Disabling color support is also possible by using the `NO_COLOR` and`NODE_DISABLE_COLORS` environment variables.
152
+ * Disabling color support is also possible by using the `NO_COLOR` and `NODE_DISABLE_COLORS` environment variables.
153
153
  * @since v9.9.0
154
154
  * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal.
155
155
  */
@@ -179,7 +179,7 @@ declare module "tty" {
179
179
  hasColors(count: number, env?: object): boolean;
180
180
  /**
181
181
  * `writeStream.getWindowSize()` returns the size of the TTY
182
- * corresponding to this `WriteStream`. The array is of the type`[numColumns, numRows]` where `numColumns` and `numRows` represent the number
182
+ * corresponding to this `WriteStream`. The array is of the type `[numColumns, numRows]` where `numColumns` and `numRows` represent the number
183
183
  * of columns and rows in the corresponding TTY.
184
184
  * @since v0.7.7
185
185
  */
node/url.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * ```js
6
6
  * import url from 'node:url';
7
7
  * ```
8
- * @see [source](https://github.com/nodejs/node/blob/v20.11.0/lib/url.js)
8
+ * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/url.js)
9
9
  */
10
10
  declare module "url" {
11
11
  import { Blob as NodeBlob } from "node:buffer";
@@ -503,9 +503,9 @@ declare module "url" {
503
503
  * Getting the value of the `href` property is equivalent to calling {@link toString}.
504
504
  *
505
505
  * Setting the value of this property to a new value is equivalent to creating a
506
- * new `URL` object using `new URL(value)`. Each of the `URL`object's properties will be modified.
506
+ * new `URL` object using `new URL(value)`. Each of the `URL` object's properties will be modified.
507
507
  *
508
- * If the value assigned to the `href` property is not a valid URL, a `TypeError`will be thrown.
508
+ * If the value assigned to the `href` property is not a valid URL, a `TypeError` will be thrown.
509
509
  */
510
510
  href: string;
511
511
  /**
@@ -664,7 +664,7 @@ declare module "url" {
664
664
  * // Prints https://example.org/abc?abc=xyz
665
665
  * ```
666
666
  *
667
- * Any invalid URL characters appearing in the value assigned the `search`property will be `percent-encoded`. The selection of which
667
+ * Any invalid URL characters appearing in the value assigned the `search` property will be `percent-encoded`. The selection of which
668
668
  * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
669
669
  */
670
670
  search: string;
@@ -858,7 +858,7 @@ declare module "url" {
858
858
  */
859
859
  keys(): IterableIterator<string>;
860
860
  /**
861
- * 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`,
861
+ * 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`,
862
862
  * set the first such pair's value to `value` and remove all others. If not,
863
863
  * append the name-value pair to the query string.
864
864
  *