@types/node 20.11.5 → 20.11.6

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 (4) hide show
  1. node/README.md +1 -1
  2. node/fs.d.ts +28 -8
  3. node/package.json +2 -2
  4. node/ts4.8/fs.d.ts +28 -8
node/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for node (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: Wed, 17 Jan 2024 06:36:16 GMT
11
+ * Last updated: Wed, 24 Jan 2024 06:08:24 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node/fs.d.ts CHANGED
@@ -281,7 +281,7 @@ declare module "fs" {
281
281
  * Asynchronously close the directory's underlying resource handle.
282
282
  * Subsequent reads will result in errors.
283
283
  *
284
- * A promise is returned that will be resolved after the resource has been
284
+ * A promise is returned that will be fulfilled after the resource has been
285
285
  * closed.
286
286
  * @since v12.12.0
287
287
  */
@@ -296,7 +296,7 @@ declare module "fs" {
296
296
  /**
297
297
  * Asynchronously read the next directory entry via [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) as an `fs.Dirent`.
298
298
  *
299
- * A promise is returned that will be resolved with an `fs.Dirent`, or `null`if there are no more directory entries to read.
299
+ * A promise is returned that will be fulfilled with an `fs.Dirent`, or `null`if there are no more directory entries to read.
300
300
  *
301
301
  * Directory entries returned by this function are in no particular order as
302
302
  * provided by the operating system's underlying directory mechanisms.
@@ -354,31 +354,51 @@ declare module "fs" {
354
354
  * @since v0.5.8
355
355
  */
356
356
  close(): void;
357
+ /**
358
+ * When called, requests that the Node.js event loop _not_ exit so long as the `fs.FSWatcher` is active. Calling `watcher.ref()` multiple times will have
359
+ * no effect.
360
+ *
361
+ * By default, all `fs.FSWatcher` objects are "ref'ed", making it normally
362
+ * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been
363
+ * called previously.
364
+ * @since v14.3.0, v12.20.0
365
+ */
366
+ ref(): this;
367
+ /**
368
+ * When called, the active `fs.FSWatcher` object will not require the Node.js
369
+ * event loop to remain active. If there is no other activity keeping the
370
+ * event loop running, the process may exit before the `fs.FSWatcher` object's
371
+ * callback is invoked. Calling `watcher.unref()` multiple times will have
372
+ * no effect.
373
+ * @since v14.3.0, v12.20.0
374
+ */
375
+ unref(): this;
357
376
  /**
358
377
  * events.EventEmitter
359
378
  * 1. change
360
- * 2. error
379
+ * 2. close
380
+ * 3. error
361
381
  */
362
382
  addListener(event: string, listener: (...args: any[]) => void): this;
363
383
  addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
364
- addListener(event: "error", listener: (error: Error) => void): this;
365
384
  addListener(event: "close", listener: () => void): this;
385
+ addListener(event: "error", listener: (error: Error) => void): this;
366
386
  on(event: string, listener: (...args: any[]) => void): this;
367
387
  on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
368
- on(event: "error", listener: (error: Error) => void): this;
369
388
  on(event: "close", listener: () => void): this;
389
+ on(event: "error", listener: (error: Error) => void): this;
370
390
  once(event: string, listener: (...args: any[]) => void): this;
371
391
  once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
372
- once(event: "error", listener: (error: Error) => void): this;
373
392
  once(event: "close", listener: () => void): this;
393
+ once(event: "error", listener: (error: Error) => void): this;
374
394
  prependListener(event: string, listener: (...args: any[]) => void): this;
375
395
  prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
376
- prependListener(event: "error", listener: (error: Error) => void): this;
377
396
  prependListener(event: "close", listener: () => void): this;
397
+ prependListener(event: "error", listener: (error: Error) => void): this;
378
398
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
379
399
  prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
380
- prependOnceListener(event: "error", listener: (error: Error) => void): this;
381
400
  prependOnceListener(event: "close", listener: () => void): this;
401
+ prependOnceListener(event: "error", listener: (error: Error) => void): this;
382
402
  }
383
403
  /**
384
404
  * Instances of `fs.ReadStream` are created and returned using the {@link createReadStream} function.
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "20.11.5",
3
+ "version": "20.11.6",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -224,7 +224,7 @@
224
224
  "dependencies": {
225
225
  "undici-types": "~5.26.4"
226
226
  },
227
- "typesPublisherContentHash": "c9a4069d05b7343bb761470d8e688010c07b955f2242b07b710e067f1720f96a",
227
+ "typesPublisherContentHash": "4672df994f41fe8261bb8674f0ae453a191329e23938a5bf005572caa3a878fc",
228
228
  "typeScriptVersion": "4.6",
229
229
  "nonNpm": true
230
230
  }
node/ts4.8/fs.d.ts CHANGED
@@ -281,7 +281,7 @@ declare module "fs" {
281
281
  * Asynchronously close the directory's underlying resource handle.
282
282
  * Subsequent reads will result in errors.
283
283
  *
284
- * A promise is returned that will be resolved after the resource has been
284
+ * A promise is returned that will be fulfilled after the resource has been
285
285
  * closed.
286
286
  * @since v12.12.0
287
287
  */
@@ -296,7 +296,7 @@ declare module "fs" {
296
296
  /**
297
297
  * Asynchronously read the next directory entry via [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) as an `fs.Dirent`.
298
298
  *
299
- * A promise is returned that will be resolved with an `fs.Dirent`, or `null`if there are no more directory entries to read.
299
+ * A promise is returned that will be fulfilled with an `fs.Dirent`, or `null`if there are no more directory entries to read.
300
300
  *
301
301
  * Directory entries returned by this function are in no particular order as
302
302
  * provided by the operating system's underlying directory mechanisms.
@@ -354,31 +354,51 @@ declare module "fs" {
354
354
  * @since v0.5.8
355
355
  */
356
356
  close(): void;
357
+ /**
358
+ * When called, requests that the Node.js event loop _not_ exit so long as the `fs.FSWatcher` is active. Calling `watcher.ref()` multiple times will have
359
+ * no effect.
360
+ *
361
+ * By default, all `fs.FSWatcher` objects are "ref'ed", making it normally
362
+ * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been
363
+ * called previously.
364
+ * @since v14.3.0, v12.20.0
365
+ */
366
+ ref(): this;
367
+ /**
368
+ * When called, the active `fs.FSWatcher` object will not require the Node.js
369
+ * event loop to remain active. If there is no other activity keeping the
370
+ * event loop running, the process may exit before the `fs.FSWatcher` object's
371
+ * callback is invoked. Calling `watcher.unref()` multiple times will have
372
+ * no effect.
373
+ * @since v14.3.0, v12.20.0
374
+ */
375
+ unref(): this;
357
376
  /**
358
377
  * events.EventEmitter
359
378
  * 1. change
360
- * 2. error
379
+ * 2. close
380
+ * 3. error
361
381
  */
362
382
  addListener(event: string, listener: (...args: any[]) => void): this;
363
383
  addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
364
- addListener(event: "error", listener: (error: Error) => void): this;
365
384
  addListener(event: "close", listener: () => void): this;
385
+ addListener(event: "error", listener: (error: Error) => void): this;
366
386
  on(event: string, listener: (...args: any[]) => void): this;
367
387
  on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
368
- on(event: "error", listener: (error: Error) => void): this;
369
388
  on(event: "close", listener: () => void): this;
389
+ on(event: "error", listener: (error: Error) => void): this;
370
390
  once(event: string, listener: (...args: any[]) => void): this;
371
391
  once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
372
- once(event: "error", listener: (error: Error) => void): this;
373
392
  once(event: "close", listener: () => void): this;
393
+ once(event: "error", listener: (error: Error) => void): this;
374
394
  prependListener(event: string, listener: (...args: any[]) => void): this;
375
395
  prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
376
- prependListener(event: "error", listener: (error: Error) => void): this;
377
396
  prependListener(event: "close", listener: () => void): this;
397
+ prependListener(event: "error", listener: (error: Error) => void): this;
378
398
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
379
399
  prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
380
- prependOnceListener(event: "error", listener: (error: Error) => void): this;
381
400
  prependOnceListener(event: "close", listener: () => void): this;
401
+ prependOnceListener(event: "error", listener: (error: Error) => void): this;
382
402
  }
383
403
  /**
384
404
  * Instances of `fs.ReadStream` are created and returned using the {@link createReadStream} function.