@types/node 16.6.2 → 16.7.0

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/fs.d.ts CHANGED
@@ -16,7 +16,7 @@
16
16
  *
17
17
  * All file system operations have synchronous, callback, and promise-based
18
18
  * forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM).
19
- * @see [source](https://github.com/nodejs/node/blob/v16.6.0/lib/fs.js)
19
+ * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/fs.js)
20
20
  */
21
21
  declare module 'fs' {
22
22
  import * as stream from 'node:stream';
@@ -71,7 +71,7 @@ declare module 'fs' {
71
71
  }
72
72
  export interface Stats extends StatsBase<number> {}
73
73
  /**
74
- * A `<fs.Stats>` object provides information about a file.
74
+ * A `fs.Stats` object provides information about a file.
75
75
  *
76
76
  * Objects returned from {@link stat}, {@link lstat} and {@link fstat} and
77
77
  * their synchronous counterparts are of this type.
@@ -133,53 +133,53 @@ declare module 'fs' {
133
133
  export class Stats {}
134
134
  /**
135
135
  * A representation of a directory entry, which can be a file or a subdirectory
136
- * within the directory, as returned by reading from an `<fs.Dir>`. The
136
+ * within the directory, as returned by reading from an `fs.Dir`. The
137
137
  * directory entry is a combination of the file name and file type pairs.
138
138
  *
139
139
  * Additionally, when {@link readdir} or {@link readdirSync} is called with
140
- * the `withFileTypes` option set to `true`, the resulting array is filled with `<fs.Dirent>` objects, rather than strings or `<Buffer>` s.
140
+ * the `withFileTypes` option set to `true`, the resulting array is filled with `fs.Dirent` objects, rather than strings or `Buffer` s.
141
141
  * @since v10.10.0
142
142
  */
143
143
  export class Dirent {
144
144
  /**
145
- * Returns `true` if the `<fs.Dirent>` object describes a regular file.
145
+ * Returns `true` if the `fs.Dirent` object describes a regular file.
146
146
  * @since v10.10.0
147
147
  */
148
148
  isFile(): boolean;
149
149
  /**
150
- * Returns `true` if the `<fs.Dirent>` object describes a file system
150
+ * Returns `true` if the `fs.Dirent` object describes a file system
151
151
  * directory.
152
152
  * @since v10.10.0
153
153
  */
154
154
  isDirectory(): boolean;
155
155
  /**
156
- * Returns `true` if the `<fs.Dirent>` object describes a block device.
156
+ * Returns `true` if the `fs.Dirent` object describes a block device.
157
157
  * @since v10.10.0
158
158
  */
159
159
  isBlockDevice(): boolean;
160
160
  /**
161
- * Returns `true` if the `<fs.Dirent>` object describes a character device.
161
+ * Returns `true` if the `fs.Dirent` object describes a character device.
162
162
  * @since v10.10.0
163
163
  */
164
164
  isCharacterDevice(): boolean;
165
165
  /**
166
- * Returns `true` if the `<fs.Dirent>` object describes a symbolic link.
166
+ * Returns `true` if the `fs.Dirent` object describes a symbolic link.
167
167
  * @since v10.10.0
168
168
  */
169
169
  isSymbolicLink(): boolean;
170
170
  /**
171
- * Returns `true` if the `<fs.Dirent>` object describes a first-in-first-out
171
+ * Returns `true` if the `fs.Dirent` object describes a first-in-first-out
172
172
  * (FIFO) pipe.
173
173
  * @since v10.10.0
174
174
  */
175
175
  isFIFO(): boolean;
176
176
  /**
177
- * Returns `true` if the `<fs.Dirent>` object describes a socket.
177
+ * Returns `true` if the `fs.Dirent` object describes a socket.
178
178
  * @since v10.10.0
179
179
  */
180
180
  isSocket(): boolean;
181
181
  /**
182
- * The file name that this `<fs.Dirent>` object refers to. The type of this
182
+ * The file name that this `fs.Dirent` object refers to. The type of this
183
183
  * value is determined by the `options.encoding` passed to {@link readdir} or {@link readdirSync}.
184
184
  * @since v10.10.0
185
185
  */
@@ -202,7 +202,7 @@ declare module 'fs' {
202
202
  * }
203
203
  * ```
204
204
  *
205
- * When using the async iterator, the `<fs.Dir>` object will be automatically
205
+ * When using the async iterator, the `fs.Dir` object will be automatically
206
206
  * closed after the iterator exits.
207
207
  * @since v12.12.0
208
208
  */
@@ -233,9 +233,9 @@ declare module 'fs' {
233
233
  */
234
234
  closeSync(): void;
235
235
  /**
236
- * Asynchronously read the next directory entry via [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) as an `<fs.Dirent>`.
236
+ * Asynchronously read the next directory entry via [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) as an `fs.Dirent`.
237
237
  *
238
- * A promise is returned that will be resolved with an `<fs.Dirent>`, or `null`if there are no more directory entries to read.
238
+ * A promise is returned that will be resolved with an `fs.Dirent`, or `null`if there are no more directory entries to read.
239
239
  *
240
240
  * Directory entries returned by this function are in no particular order as
241
241
  * provided by the operating system's underlying directory mechanisms.
@@ -247,7 +247,7 @@ declare module 'fs' {
247
247
  read(): Promise<Dirent | null>;
248
248
  read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void;
249
249
  /**
250
- * Synchronously read the next directory entry as an `<fs.Dirent>`. See the
250
+ * Synchronously read the next directory entry as an `fs.Dirent`. See the
251
251
  * POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more detail.
252
252
  *
253
253
  * If there are no more directory entries to read, `null` will be returned.
@@ -262,7 +262,7 @@ declare module 'fs' {
262
262
  }
263
263
  export interface FSWatcher extends EventEmitter {
264
264
  /**
265
- * Stop watching for changes on the given `<fs.FSWatcher>`. Once stopped, the `<fs.FSWatcher>` object is no longer usable.
265
+ * Stop watching for changes on the given `fs.FSWatcher`. Once stopped, the `fs.FSWatcher` object is no longer usable.
266
266
  * @since v0.5.8
267
267
  */
268
268
  close(): void;
@@ -293,7 +293,7 @@ declare module 'fs' {
293
293
  prependOnceListener(event: 'close', listener: () => void): this;
294
294
  }
295
295
  /**
296
- * Instances of `<fs.ReadStream>` are created and returned using the {@link createReadStream} function.
296
+ * Instances of `fs.ReadStream` are created and returned using the {@link createReadStream} function.
297
297
  * @since v0.1.93
298
298
  */
299
299
  export class ReadStream extends stream.Readable {
@@ -305,8 +305,8 @@ declare module 'fs' {
305
305
  bytesRead: number;
306
306
  /**
307
307
  * The path to the file the stream is reading from as specified in the first
308
- * argument to `fs.createReadStream()`. If `path` is passed as a string, then`readStream.path` will be a string. If `path` is passed as a `<Buffer>`, then`readStream.path` will be a
309
- * `<Buffer>`.
308
+ * argument to `fs.createReadStream()`. If `path` is passed as a string, then`readStream.path` will be a string. If `path` is passed as a `Buffer`, then`readStream.path` will be a
309
+ * `Buffer`.
310
310
  * @since v0.1.93
311
311
  */
312
312
  path: string | Buffer;
@@ -374,9 +374,9 @@ declare module 'fs' {
374
374
  prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
375
375
  }
376
376
  /**
377
- * * Extends `<stream.Writable>`
377
+ * * Extends `stream.Writable`
378
378
  *
379
- * Instances of `<fs.WriteStream>` are created and returned using the {@link createWriteStream} function.
379
+ * Instances of `fs.WriteStream` are created and returned using the {@link createWriteStream} function.
380
380
  * @since v0.1.93
381
381
  */
382
382
  export class WriteStream extends stream.Writable {
@@ -394,8 +394,8 @@ declare module 'fs' {
394
394
  bytesWritten: number;
395
395
  /**
396
396
  * The path to the file the stream is writing to as specified in the first
397
- * argument to {@link createWriteStream}. If `path` is passed as a string, then`writeStream.path` will be a string. If `path` is passed as a `<Buffer>`, then`writeStream.path` will be a
398
- * `<Buffer>`.
397
+ * argument to {@link createWriteStream}. If `path` is passed as a string, then`writeStream.path` will be a string. If `path` is passed as a `Buffer`, then`writeStream.path` will be a
398
+ * `Buffer`.
399
399
  * @since v0.1.93
400
400
  */
401
401
  path: string | Buffer;
@@ -499,6 +499,15 @@ declare module 'fs' {
499
499
  * given to the completion callback. A file descriptor can also be passed as the
500
500
  * first argument. In this case, `fs.ftruncate()` is called.
501
501
  *
502
+ * ```js
503
+ * import { truncate } from 'fs';
504
+ * // Assuming that 'path/file.txt' is a regular file.
505
+ * truncate('path/file.txt', (err) => {
506
+ * if (err) throw err;
507
+ * console.log('path/file.txt was truncated');
508
+ * });
509
+ * ```
510
+ *
502
511
  * Passing a file descriptor is deprecated and may result in an error being thrown
503
512
  * in the future.
504
513
  *
@@ -777,7 +786,7 @@ declare module 'fs' {
777
786
  */
778
787
  export function lchmodSync(path: PathLike, mode: Mode): void;
779
788
  /**
780
- * Asynchronous [`stat(2)`](http://man7.org/linux/man-pages/man2/stat.2.html). The callback gets two arguments `(err, stats)` where`stats` is an `<fs.Stats>` object.
789
+ * Asynchronous [`stat(2)`](http://man7.org/linux/man-pages/man2/stat.2.html). The callback gets two arguments `(err, stats)` where`stats` is an `fs.Stats` object.
781
790
  *
782
791
  * In case of an error, the `err.code` will be one of `Common System Errors`.
783
792
  *
@@ -938,7 +947,7 @@ declare module 'fs' {
938
947
  */
939
948
  export const statSync: StatSyncFn;
940
949
  /**
941
- * Invokes the callback with the `<fs.Stats>` for the file descriptor.
950
+ * Invokes the callback with the `fs.Stats` for the file descriptor.
942
951
  *
943
952
  * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail.
944
953
  * @since v0.1.95
@@ -986,8 +995,8 @@ declare module 'fs' {
986
995
  */
987
996
  export const fstatSync: StatSyncFn<number>;
988
997
  /**
989
- * Retrieves the `<fs.Stats>` for the symbolic link referred to by the path.
990
- * The callback gets two arguments `(err, stats)` where `stats` is a `<fs.Stats>` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic
998
+ * Retrieves the `fs.Stats` for the symbolic link referred to by the path.
999
+ * The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic
991
1000
  * link, then the link itself is stat-ed, not the file that it refers to.
992
1001
  *
993
1002
  * See the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) documentation for more details.
@@ -1121,7 +1130,7 @@ declare module 'fs' {
1121
1130
  * The optional `options` argument can be a string specifying an encoding, or an
1122
1131
  * object with an `encoding` property specifying the character encoding to use for
1123
1132
  * the link path passed to the callback. If the `encoding` is set to `'buffer'`,
1124
- * the link path returned will be passed as a `<Buffer>` object.
1133
+ * the link path returned will be passed as a `Buffer` object.
1125
1134
  * @since v0.1.31
1126
1135
  */
1127
1136
  export function readlink(path: PathLike, options: EncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void;
@@ -1170,7 +1179,7 @@ declare module 'fs' {
1170
1179
  * The optional `options` argument can be a string specifying an encoding, or an
1171
1180
  * object with an `encoding` property specifying the character encoding to use for
1172
1181
  * the link path returned. If the `encoding` is set to `'buffer'`,
1173
- * the link path returned will be passed as a `<Buffer>` object.
1182
+ * the link path returned will be passed as a `Buffer` object.
1174
1183
  * @since v0.1.31
1175
1184
  */
1176
1185
  export function readlinkSync(path: PathLike, options?: EncodingOption): string;
@@ -1206,7 +1215,7 @@ declare module 'fs' {
1206
1215
  * The optional `options` argument can be a string specifying an encoding, or an
1207
1216
  * object with an `encoding` property specifying the character encoding to use for
1208
1217
  * the path passed to the callback. If the `encoding` is set to `'buffer'`,
1209
- * the path returned will be passed as a `<Buffer>` object.
1218
+ * the path returned will be passed as a `Buffer` object.
1210
1219
  *
1211
1220
  * If `path` resolves to a socket or a pipe, the function will return a system
1212
1221
  * dependent name for that object.
@@ -1259,7 +1268,7 @@ declare module 'fs' {
1259
1268
  * The optional `options` argument can be a string specifying an encoding, or an
1260
1269
  * object with an `encoding` property specifying the character encoding to use for
1261
1270
  * the path passed to the callback. If the `encoding` is set to `'buffer'`,
1262
- * the path returned will be passed as a `<Buffer>` object.
1271
+ * the path returned will be passed as a `Buffer` object.
1263
1272
  *
1264
1273
  * On Linux, when Node.js is linked against musl libc, the procfs file system must
1265
1274
  * be mounted on `/proc` in order for this function to work. Glibc does not have
@@ -1719,9 +1728,9 @@ declare module 'fs' {
1719
1728
  * The optional `options` argument can be a string specifying an encoding, or an
1720
1729
  * object with an `encoding` property specifying the character encoding to use for
1721
1730
  * the filenames passed to the callback. If the `encoding` is set to `'buffer'`,
1722
- * the filenames returned will be passed as `<Buffer>` objects.
1731
+ * the filenames returned will be passed as `Buffer` objects.
1723
1732
  *
1724
- * If `options.withFileTypes` is set to `true`, the `files` array will contain `<fs.Dirent>` objects.
1733
+ * If `options.withFileTypes` is set to `true`, the `files` array will contain `fs.Dirent` objects.
1725
1734
  * @since v0.1.8
1726
1735
  */
1727
1736
  export function readdir(
@@ -1848,9 +1857,9 @@ declare module 'fs' {
1848
1857
  * The optional `options` argument can be a string specifying an encoding, or an
1849
1858
  * object with an `encoding` property specifying the character encoding to use for
1850
1859
  * the filenames returned. If the `encoding` is set to `'buffer'`,
1851
- * the filenames returned will be passed as `<Buffer>` objects.
1860
+ * the filenames returned will be passed as `Buffer` objects.
1852
1861
  *
1853
- * If `options.withFileTypes` is set to `true`, the result will contain `<fs.Dirent>` objects.
1862
+ * If `options.withFileTypes` is set to `true`, the result will contain `fs.Dirent` objects.
1854
1863
  * @since v0.1.21
1855
1864
  */
1856
1865
  export function readdirSync(
@@ -2530,7 +2539,7 @@ declare module 'fs' {
2530
2539
  * performs multiple `write` calls internally to write the buffer passed to it.
2531
2540
  * For performance sensitive code consider using {@link createWriteStream}.
2532
2541
  *
2533
- * It is possible to use an `<AbortSignal>` to cancel an `fs.writeFile()`.
2542
+ * It is possible to use an `AbortSignal` to cancel an `fs.writeFile()`.
2534
2543
  * Cancelation is "best effort", and some amount of data is likely still
2535
2544
  * to be written.
2536
2545
  *
@@ -2589,7 +2598,7 @@ declare module 'fs' {
2589
2598
  export function writeFileSync(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): void;
2590
2599
  /**
2591
2600
  * Asynchronously append data to a file, creating the file if it does not yet
2592
- * exist. `data` can be a string or a `<Buffer>`.
2601
+ * exist. `data` can be a string or a `Buffer`.
2593
2602
  *
2594
2603
  * ```js
2595
2604
  * import { appendFile } from 'fs';
@@ -2663,7 +2672,7 @@ declare module 'fs' {
2663
2672
  }
2664
2673
  /**
2665
2674
  * Synchronously append data to a file, creating the file if it does not yet
2666
- * exist. `data` can be a string or a `<Buffer>`.
2675
+ * exist. `data` can be a string or a `Buffer`.
2667
2676
  *
2668
2677
  * ```js
2669
2678
  * import { appendFileSync } from 'fs';
@@ -2801,10 +2810,10 @@ declare module 'fs' {
2801
2810
  * On most platforms, `'rename'` is emitted whenever a filename appears or
2802
2811
  * disappears in the directory.
2803
2812
  *
2804
- * The listener callback is attached to the `'change'` event fired by `<fs.FSWatcher>`, but it is not the same thing as the `'change'` value of`eventType`.
2813
+ * The listener callback is attached to the `'change'` event fired by `fs.FSWatcher`, but it is not the same thing as the `'change'` value of`eventType`.
2805
2814
  *
2806
2815
  * If a `signal` is passed, aborting the corresponding AbortController will close
2807
- * the returned `<fs.FSWatcher>`.
2816
+ * the returned `fs.FSWatcher`.
2808
2817
  * @since v0.5.10
2809
2818
  * @param listener
2810
2819
  */
@@ -3338,11 +3347,11 @@ declare module 'fs' {
3338
3347
  * start counting at 0, allowed values are in the
3339
3348
  * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `fd` is specified and `start` is
3340
3349
  * omitted or `undefined`, `fs.createReadStream()` reads sequentially from the
3341
- * current file position. The `encoding` can be any one of those accepted by `<Buffer>`.
3350
+ * current file position. The `encoding` can be any one of those accepted by `Buffer`.
3342
3351
  *
3343
3352
  * If `fd` is specified, `ReadStream` will ignore the `path` argument and will use
3344
3353
  * the specified file descriptor. This means that no `'open'` event will be
3345
- * emitted. `fd` should be blocking; non-blocking `fd`s should be passed to `<net.Socket>`.
3354
+ * emitted. `fd` should be blocking; non-blocking `fd`s should be passed to `net.Socket`.
3346
3355
  *
3347
3356
  * If `fd` points to a character device that only supports blocking reads
3348
3357
  * (such as keyboard or sound card), read operations do not finish until data is
@@ -3399,7 +3408,7 @@ declare module 'fs' {
3399
3408
  * position past the beginning of the file, allowed values are in the
3400
3409
  * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than replacing
3401
3410
  * it may require the `flags` option to be set to `r+` rather than the default `w`.
3402
- * The `encoding` can be any one of those accepted by `<Buffer>`.
3411
+ * The `encoding` can be any one of those accepted by `Buffer`.
3403
3412
  *
3404
3413
  * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'`the file descriptor will be closed automatically. If `autoClose` is false,
3405
3414
  * then the file descriptor won't be closed, even if there's an error.
@@ -3413,9 +3422,9 @@ declare module 'fs' {
3413
3422
  * performance as some optimizations (`_writev()`)
3414
3423
  * will be disabled. When providing the `fs` option, overrides for `open`,`close`, and at least one of `write` and `writev` are required.
3415
3424
  *
3416
- * Like `<fs.ReadStream>`, if `fd` is specified, `<fs.WriteStream>` will ignore the`path` argument and will use the specified file descriptor. This means that no`'open'` event will be
3425
+ * Like `fs.ReadStream`, if `fd` is specified, `fs.WriteStream` will ignore the`path` argument and will use the specified file descriptor. This means that no`'open'` event will be
3417
3426
  * emitted. `fd` should be blocking; non-blocking `fd`s
3418
- * should be passed to `<net.Socket>`.
3427
+ * should be passed to `net.Socket`.
3419
3428
  *
3420
3429
  * If `options` is a string, then it specifies the encoding.
3421
3430
  * @since v0.1.31
@@ -3610,7 +3619,7 @@ declare module 'fs' {
3610
3619
  /**
3611
3620
  * Synchronously open a directory. See [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html).
3612
3621
  *
3613
- * Creates an `<fs.Dir>`, which contains all further functions for reading from
3622
+ * Creates an `fs.Dir`, which contains all further functions for reading from
3614
3623
  * and cleaning up the directory.
3615
3624
  *
3616
3625
  * The `encoding` option sets the encoding for the `path` while opening the
@@ -3622,7 +3631,7 @@ declare module 'fs' {
3622
3631
  * Asynchronously open a directory. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for
3623
3632
  * more details.
3624
3633
  *
3625
- * Creates an `<fs.Dir>`, which contains all further functions for reading from
3634
+ * Creates an `fs.Dir`, which contains all further functions for reading from
3626
3635
  * and cleaning up the directory.
3627
3636
  *
3628
3637
  * The `encoding` option sets the encoding for the `path` while opening the
@@ -3647,6 +3656,67 @@ declare module 'fs' {
3647
3656
  bigint?: boolean | undefined;
3648
3657
  throwIfNoEntry?: boolean | undefined;
3649
3658
  }
3659
+ export interface CopyOptions {
3660
+ /**
3661
+ * Dereference symlinks
3662
+ * @default false
3663
+ */
3664
+ dereference?: boolean;
3665
+ /**
3666
+ * When `force` is `false`, and the destination
3667
+ * exists, throw an error.
3668
+ * @default false
3669
+ */
3670
+ errorOnExist?: boolean;
3671
+ /**
3672
+ * Function to filter copied files/directories. Return
3673
+ * `true` to copy the item, `false` to ignore it.
3674
+ */
3675
+ filter?(source: string, destination: string): boolean;
3676
+ /**
3677
+ * Overwrite existing file or directory. _The copy
3678
+ * operation will ignore errors if you set this to false and the destination
3679
+ * exists. Use the `errorOnExist` option to change this behavior.
3680
+ * @default true
3681
+ */
3682
+ force?: boolean;
3683
+ /**
3684
+ * When `true` timestamps from `src` will
3685
+ * be preserved.
3686
+ * @default false
3687
+ */
3688
+ preserveTimestamps?: boolean;
3689
+ /**
3690
+ * Copy directories recursively.
3691
+ * @default false
3692
+ */
3693
+ recursive?: boolean;
3694
+ }
3695
+ /**
3696
+ * Asynchronously copies the entire directory structure from `src` to `dest`,
3697
+ * including subdirectories and files.
3698
+ *
3699
+ * When copying a directory to another directory, globs are not supported and
3700
+ * behavior is similar to `cp dir1/ dir2/`.
3701
+ * @since v16.7.0
3702
+ * @experimental
3703
+ * @param src source path to copy.
3704
+ * @param dest destination path to copy to.
3705
+ */
3706
+ export function cp(source: string, destination: string, callback: (err: NodeJS.ErrnoException | null) => void): void;
3707
+ export function cp(source: string, destination: string, opts: CopyOptions, callback: (err: NodeJS.ErrnoException | null) => void): void;
3708
+ /**
3709
+ * Synchronously copies the entire directory structure from `src` to `dest`,
3710
+ * including subdirectories and files.
3711
+ *
3712
+ * When copying a directory to another directory, globs are not supported and
3713
+ * behavior is similar to `cp dir1/ dir2/`.
3714
+ * @since v16.7.0
3715
+ * @experimental
3716
+ * @param src source path to copy.
3717
+ * @param dest destination path to copy to.
3718
+ */
3719
+ export function cpSync(source: string, destination: string, opts?: CopyOptions): void;
3650
3720
  }
3651
3721
  declare module 'node:fs' {
3652
3722
  export * from 'fs';
node/http.d.ts CHANGED
@@ -37,7 +37,7 @@
37
37
  * 'Host', 'mysite.com',
38
38
  * 'accepT', '*' ]
39
39
  * ```
40
- * @see [source](https://github.com/nodejs/node/blob/v16.6.0/lib/http.js)
40
+ * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/http.js)
41
41
  */
42
42
  declare module 'http' {
43
43
  import * as stream from 'node:stream';
@@ -740,7 +740,7 @@ declare module 'http' {
740
740
  * access response
741
741
  * status, headers and data.
742
742
  *
743
- * Different from its `socket` value which is a subclass of `<stream.Duplex>`, the`IncomingMessage` itself extends `<stream.Readable>` and is created separately to
743
+ * Different from its `socket` value which is a subclass of `stream.Duplex`, the`IncomingMessage` itself extends `stream.Readable` and is created separately to
744
744
  * parse and emit the incoming HTTP headers and payload, as the underlying socket
745
745
  * may be reused multiple times in case of keep-alive.
746
746
  * @since v0.1.17
@@ -800,9 +800,9 @@ declare module 'http' {
800
800
  * With HTTPS support, use `request.socket.getPeerCertificate()` to obtain the
801
801
  * client's authentication details.
802
802
  *
803
- * This property is guaranteed to be an instance of the `<net.Socket>` class,
804
- * a subclass of `<stream.Duplex>`, unless the user specified a socket
805
- * type other than `<net.Socket>`.
803
+ * This property is guaranteed to be an instance of the `net.Socket` class,
804
+ * a subclass of `stream.Duplex`, unless the user specified a socket
805
+ * type other than `net.Socket`.
806
806
  * @since v0.3.0
807
807
  */
808
808
  socket: Socket;
node/http2.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * const http2 = require('http2');
7
7
  * ```
8
8
  * @since v8.4.0
9
- * @see [source](https://github.com/nodejs/node/blob/v16.6.0/lib/http2.js)
9
+ * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/http2.js)
10
10
  */
11
11
  declare module 'http2' {
12
12
  import EventEmitter = require('node:events');
node/https.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
3
3
  * separate module.
4
- * @see [source](https://github.com/nodejs/node/blob/v16.6.0/lib/https.js)
4
+ * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/https.js)
5
5
  */
6
6
  declare module 'https' {
7
7
  import { Duplex } from 'node:stream';
node/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for non-npm package Node.js 16.6
1
+ // Type definitions for non-npm package Node.js 16.7
2
2
  // Project: http://nodejs.org/
3
3
  // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4
4
  // DefinitelyTyped <https://github.com/DefinitelyTyped>
node/inspector.d.ts CHANGED
@@ -15,7 +15,7 @@
15
15
  * ```js
16
16
  * const inspector = require('inspector');
17
17
  * ```
18
- * @see [source](https://github.com/nodejs/node/blob/v16.6.0/lib/inspector.js)
18
+ * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/inspector.js)
19
19
  */
20
20
  declare module 'inspector' {
21
21
  import EventEmitter = require('node:events');
node/net.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  * ```js
11
11
  * const net = require('net');
12
12
  * ```
13
- * @see [source](https://github.com/nodejs/node/blob/v16.6.0/lib/net.js)
13
+ * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/net.js)
14
14
  */
15
15
  declare module 'net' {
16
16
  import * as stream from 'node:stream';
@@ -99,7 +99,7 @@ declare module 'net' {
99
99
  * * `socket.connect(options[, connectListener])`
100
100
  * * `socket.connect(path[, connectListener])` for `IPC` connections.
101
101
  * * `socket.connect(port[, host][, connectListener])` for TCP connections.
102
- * * Returns: `<net.Socket>` The socket itself.
102
+ * * Returns: `net.Socket` The socket itself.
103
103
  *
104
104
  * This function is asynchronous. When the connection is established, the `'connect'` event will be emitted. If there is a problem connecting,
105
105
  * instead of a `'connect'` event, an `'error'` event will be emitted with
node/os.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * ```js
6
6
  * const os = require('os');
7
7
  * ```
8
- * @see [source](https://github.com/nodejs/node/blob/v16.6.0/lib/os.js)
8
+ * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/os.js)
9
9
  */
10
10
  declare module 'os' {
11
11
  interface CpuInfo {
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "16.6.2",
3
+ "version": "16.7.0",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -237,6 +237,6 @@
237
237
  },
238
238
  "scripts": {},
239
239
  "dependencies": {},
240
- "typesPublisherContentHash": "9098a84e13359567fcbeac38e6b9c82834a684435352a1307abccf6f39a6b5a3",
241
- "typeScriptVersion": "3.6"
240
+ "typesPublisherContentHash": "7cd86199c47cc6326c3466fa04e6a7ddc2670bd283713c0c6ef81cfe9e715118",
241
+ "typeScriptVersion": "3.7"
242
242
  }
node/path.d.ts CHANGED
@@ -13,7 +13,7 @@ declare module 'path/win32' {
13
13
  * ```js
14
14
  * const path = require('path');
15
15
  * ```
16
- * @see [source](https://github.com/nodejs/node/blob/v16.6.0/lib/path.js)
16
+ * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/path.js)
17
17
  */
18
18
  declare module 'path' {
19
19
  namespace path {
node/perf_hooks.d.ts CHANGED
@@ -26,7 +26,7 @@
26
26
  * performance.measure('A to B', 'A', 'B');
27
27
  * });
28
28
  * ```
29
- * @see [source](https://github.com/nodejs/node/blob/v16.6.0/lib/perf_hooks.js)
29
+ * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/perf_hooks.js)
30
30
  */
31
31
  declare module 'perf_hooks' {
32
32
  import { AsyncResource } from 'node:async_hooks';
@@ -375,7 +375,7 @@ declare module 'perf_hooks' {
375
375
  */
376
376
  disconnect(): void;
377
377
  /**
378
- * Subscribes the `<PerformanceObserver>` instance to notifications of new `<PerformanceEntry>` instances identified either by `options.entryTypes`or `options.type`:
378
+ * Subscribes the `PerformanceObserver` instance to notifications of new `PerformanceEntry` instances identified either by `options.entryTypes`or `options.type`:
379
379
  *
380
380
  * ```js
381
381
  * const {
@@ -545,7 +545,7 @@ declare module 'perf_hooks' {
545
545
  figures?: number | undefined;
546
546
  }
547
547
  /**
548
- * Returns a `<RecordableHistogram>`.
548
+ * Returns a `RecordableHistogram`.
549
549
  * @since v15.9.0
550
550
  */
551
551
  function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
node/punycode.d.ts CHANGED
@@ -24,7 +24,7 @@
24
24
  * made available to developers as a convenience. Fixes or other modifications to
25
25
  * the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project.
26
26
  * @deprecated Since v7.0.0 - Deprecated
27
- * @see [source](https://github.com/nodejs/node/blob/v16.6.0/lib/punycode.js)
27
+ * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/punycode.js)
28
28
  */
29
29
  declare module 'punycode' {
30
30
  /**
node/querystring.d.ts CHANGED
@@ -7,9 +7,9 @@
7
7
  * ```
8
8
  *
9
9
  * The `querystring` API is considered Legacy. While it is still maintained,
10
- * new code should use the `<URLSearchParams>` API instead.
10
+ * new code should use the `URLSearchParams` API instead.
11
11
  * @deprecated Legacy
12
- * @see [source](https://github.com/nodejs/node/blob/v16.6.0/lib/querystring.js)
12
+ * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/querystring.js)
13
13
  */
14
14
  declare module 'querystring' {
15
15
  interface StringifyOptions {
node/readline.d.ts CHANGED
@@ -26,7 +26,7 @@
26
26
  *
27
27
  * Once this code is invoked, the Node.js application will not terminate until the`readline.Interface` is closed because the interface waits for data to be
28
28
  * received on the `input` stream.
29
- * @see [source](https://github.com/nodejs/node/blob/v16.6.0/lib/readline.js)
29
+ * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/readline.js)
30
30
  */
31
31
  declare module 'readline' {
32
32
  import { Abortable, EventEmitter } from 'node:events';
node/repl.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * ```js
7
7
  * const repl = require('repl');
8
8
  * ```
9
- * @see [source](https://github.com/nodejs/node/blob/v16.6.0/lib/repl.js)
9
+ * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/repl.js)
10
10
  */
11
11
  declare module 'repl' {
12
12
  import { Interface, Completer, AsyncCompleter } from 'node:readline';
node/stream/web.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  declare module 'stream/web' {
2
2
  // stub module, pending copy&paste from .d.ts or manual impl
3
3
  }
4
-
5
4
  declare module 'node:stream/web' {
6
5
  export * from 'stream/web';
7
6
  }
node/stream.d.ts CHANGED
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * The `stream` module is useful for creating new types of stream instances. It is
16
16
  * usually not necessary to use the `stream` module to consume streams.
17
- * @see [source](https://github.com/nodejs/node/blob/v16.6.0/lib/stream.js)
17
+ * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/stream.js)
18
18
  */
19
19
  declare module 'stream' {
20
20
  import { EventEmitter, Abortable } from 'node:events';
@@ -1007,7 +1007,7 @@ declare module 'stream' {
1007
1007
  * ```
1008
1008
  *
1009
1009
  * The `pipeline` API provides a promise version, which can also
1010
- * receive an options argument as the last parameter with a`signal` `<AbortSignal>` property. When the signal is aborted,`destroy` will be called on the underlying pipeline, with
1010
+ * receive an options argument as the last parameter with a`signal` `AbortSignal` property. When the signal is aborted,`destroy` will be called on the underlying pipeline, with
1011
1011
  * an`AbortError`.
1012
1012
  *
1013
1013
  * ```js