@types/node 18.19.7 → 18.19.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 v18.19/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/v18.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 15 Jan 2024 04:07:53 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 v18.19/fs.d.ts CHANGED
@@ -334,31 +334,51 @@ declare module "fs" {
334
334
  * @since v0.5.8
335
335
  */
336
336
  close(): void;
337
+ /**
338
+ * 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
339
+ * no effect.
340
+ *
341
+ * By default, all `fs.FSWatcher` objects are "ref'ed", making it normally
342
+ * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been
343
+ * called previously.
344
+ * @since v14.3.0, v12.20.0
345
+ */
346
+ ref(): this;
347
+ /**
348
+ * When called, the active `fs.FSWatcher` object will not require the Node.js
349
+ * event loop to remain active. If there is no other activity keeping the
350
+ * event loop running, the process may exit before the `fs.FSWatcher` object's
351
+ * callback is invoked. Calling `watcher.unref()` multiple times will have
352
+ * no effect.
353
+ * @since v14.3.0, v12.20.0
354
+ */
355
+ unref(): this;
337
356
  /**
338
357
  * events.EventEmitter
339
358
  * 1. change
340
- * 2. error
359
+ * 2. close
360
+ * 3. error
341
361
  */
342
362
  addListener(event: string, listener: (...args: any[]) => void): this;
343
363
  addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
344
- addListener(event: "error", listener: (error: Error) => void): this;
345
364
  addListener(event: "close", listener: () => void): this;
365
+ addListener(event: "error", listener: (error: Error) => void): this;
346
366
  on(event: string, listener: (...args: any[]) => void): this;
347
367
  on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
348
- on(event: "error", listener: (error: Error) => void): this;
349
368
  on(event: "close", listener: () => void): this;
369
+ on(event: "error", listener: (error: Error) => void): this;
350
370
  once(event: string, listener: (...args: any[]) => void): this;
351
371
  once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
352
- once(event: "error", listener: (error: Error) => void): this;
353
372
  once(event: "close", listener: () => void): this;
373
+ once(event: "error", listener: (error: Error) => void): this;
354
374
  prependListener(event: string, listener: (...args: any[]) => void): this;
355
375
  prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
356
- prependListener(event: "error", listener: (error: Error) => void): this;
357
376
  prependListener(event: "close", listener: () => void): this;
377
+ prependListener(event: "error", listener: (error: Error) => void): this;
358
378
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
359
379
  prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
360
- prependOnceListener(event: "error", listener: (error: Error) => void): this;
361
380
  prependOnceListener(event: "close", listener: () => void): this;
381
+ prependOnceListener(event: "error", listener: (error: Error) => void): this;
362
382
  }
363
383
  /**
364
384
  * Instances of `fs.ReadStream` are created and returned using the {@link createReadStream} function.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "18.19.7",
3
+ "version": "18.19.9",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -229,7 +229,7 @@
229
229
  "dependencies": {
230
230
  "undici-types": "~5.26.4"
231
231
  },
232
- "typesPublisherContentHash": "de019e2111104c10bd646408844bf205cf3101f87f43288874719dc55ec16e43",
232
+ "typesPublisherContentHash": "0e51d539034444cb5194149387246b7a07c3c731efa6731aab0864477b0b9f00",
233
233
  "typeScriptVersion": "4.6",
234
234
  "nonNpm": true
235
235
  }
@@ -328,7 +328,23 @@ declare module "stream/web" {
328
328
  }
329
329
  const TextDecoderStream: {
330
330
  prototype: TextDecoderStream;
331
- new(label?: string, options?: TextDecoderOptions): TextDecoderStream;
331
+ new(encoding?: string, options?: TextDecoderOptions): TextDecoderStream;
332
+ };
333
+ interface CompressionStream<R = any, W = any> {
334
+ readonly readable: ReadableStream<R>;
335
+ readonly writable: WritableStream<W>;
336
+ }
337
+ const CompressionStream: {
338
+ prototype: CompressionStream;
339
+ new<R = any, W = any>(format: string): CompressionStream<R, W>;
340
+ };
341
+ interface DecompressionStream<R = any, W = any> {
342
+ readonly readable: ReadableStream<R>;
343
+ readonly writable: WritableStream<W>;
344
+ }
345
+ const DecompressionStream: {
346
+ prototype: DecompressionStream;
347
+ new<R = any, W = any>(format: string): DecompressionStream<R, W>;
332
348
  };
333
349
  }
334
350
  declare module "node:stream/web" {
@@ -334,31 +334,51 @@ declare module "fs" {
334
334
  * @since v0.5.8
335
335
  */
336
336
  close(): void;
337
+ /**
338
+ * 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
339
+ * no effect.
340
+ *
341
+ * By default, all `fs.FSWatcher` objects are "ref'ed", making it normally
342
+ * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been
343
+ * called previously.
344
+ * @since v14.3.0, v12.20.0
345
+ */
346
+ ref(): this;
347
+ /**
348
+ * When called, the active `fs.FSWatcher` object will not require the Node.js
349
+ * event loop to remain active. If there is no other activity keeping the
350
+ * event loop running, the process may exit before the `fs.FSWatcher` object's
351
+ * callback is invoked. Calling `watcher.unref()` multiple times will have
352
+ * no effect.
353
+ * @since v14.3.0, v12.20.0
354
+ */
355
+ unref(): this;
337
356
  /**
338
357
  * events.EventEmitter
339
358
  * 1. change
340
- * 2. error
359
+ * 2. close
360
+ * 3. error
341
361
  */
342
362
  addListener(event: string, listener: (...args: any[]) => void): this;
343
363
  addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
344
- addListener(event: "error", listener: (error: Error) => void): this;
345
364
  addListener(event: "close", listener: () => void): this;
365
+ addListener(event: "error", listener: (error: Error) => void): this;
346
366
  on(event: string, listener: (...args: any[]) => void): this;
347
367
  on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
348
- on(event: "error", listener: (error: Error) => void): this;
349
368
  on(event: "close", listener: () => void): this;
369
+ on(event: "error", listener: (error: Error) => void): this;
350
370
  once(event: string, listener: (...args: any[]) => void): this;
351
371
  once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
352
- once(event: "error", listener: (error: Error) => void): this;
353
372
  once(event: "close", listener: () => void): this;
373
+ once(event: "error", listener: (error: Error) => void): this;
354
374
  prependListener(event: string, listener: (...args: any[]) => void): this;
355
375
  prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
356
- prependListener(event: "error", listener: (error: Error) => void): this;
357
376
  prependListener(event: "close", listener: () => void): this;
377
+ prependListener(event: "error", listener: (error: Error) => void): this;
358
378
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
359
379
  prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
360
- prependOnceListener(event: "error", listener: (error: Error) => void): this;
361
380
  prependOnceListener(event: "close", listener: () => void): this;
381
+ prependOnceListener(event: "error", listener: (error: Error) => void): this;
362
382
  }
363
383
  /**
364
384
  * Instances of `fs.ReadStream` are created and returned using the {@link createReadStream} function.
@@ -328,7 +328,23 @@ declare module "stream/web" {
328
328
  }
329
329
  const TextDecoderStream: {
330
330
  prototype: TextDecoderStream;
331
- new(label?: string, options?: TextDecoderOptions): TextDecoderStream;
331
+ new(encoding?: string, options?: TextDecoderOptions): TextDecoderStream;
332
+ };
333
+ interface CompressionStream<R = any, W = any> {
334
+ readonly readable: ReadableStream<R>;
335
+ readonly writable: WritableStream<W>;
336
+ }
337
+ const CompressionStream: {
338
+ prototype: CompressionStream;
339
+ new<R = any, W = any>(format: string): CompressionStream<R, W>;
340
+ };
341
+ interface DecompressionStream<R = any, W = any> {
342
+ readonly readable: ReadableStream<R>;
343
+ readonly writable: WritableStream<W>;
344
+ }
345
+ const DecompressionStream: {
346
+ prototype: DecompressionStream;
347
+ new<R = any, W = any>(format: string): DecompressionStream<R, W>;
332
348
  };
333
349
  }
334
350
  declare module "node:stream/web" {