@types/node 16.18.44 → 16.18.45
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 v16.18/README.md +1 -1
- node v16.18/package.json +2 -2
- node v16.18/stream.d.ts +33 -0
node v16.18/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v16.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Thu, 24 Aug 2023 21:33:11 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
|
|
14
14
|
|
node v16.18/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "16.18.
|
|
3
|
+
"version": "16.18.45",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -227,6 +227,6 @@
|
|
|
227
227
|
},
|
|
228
228
|
"scripts": {},
|
|
229
229
|
"dependencies": {},
|
|
230
|
-
"typesPublisherContentHash": "
|
|
230
|
+
"typesPublisherContentHash": "a86f55ee922888fa1bc11bd0d4aab62c1fd96873567c277ad7f8be39328bfeac",
|
|
231
231
|
"typeScriptVersion": "4.3"
|
|
232
232
|
}
|
node v16.18/stream.d.ts
CHANGED
|
@@ -45,6 +45,12 @@ declare module 'stream' {
|
|
|
45
45
|
encoding?: BufferEncoding | undefined;
|
|
46
46
|
read?(this: Readable, size: number): void;
|
|
47
47
|
}
|
|
48
|
+
interface ArrayOptions {
|
|
49
|
+
/** the maximum concurrent invocations of `fn` to call on the stream at once. **Default: 1**. */
|
|
50
|
+
concurrency?: number;
|
|
51
|
+
/** allows destroying the stream if the signal is aborted. */
|
|
52
|
+
signal?: AbortSignal;
|
|
53
|
+
}
|
|
48
54
|
/**
|
|
49
55
|
* @since v0.9.4
|
|
50
56
|
*/
|
|
@@ -397,6 +403,33 @@ declare module 'stream' {
|
|
|
397
403
|
*/
|
|
398
404
|
wrap(stream: NodeJS.ReadableStream): this;
|
|
399
405
|
push(chunk: any, encoding?: BufferEncoding): boolean;
|
|
406
|
+
/**
|
|
407
|
+
* The iterator created by this method gives users the option to cancel the destruction
|
|
408
|
+
* of the stream if the `for await...of` loop is exited by `return`, `break`, or `throw`,
|
|
409
|
+
* or if the iterator should destroy the stream if the stream emitted an error during iteration.
|
|
410
|
+
* @since v16.3.0
|
|
411
|
+
* @param options.destroyOnReturn When set to `false`, calling `return` on the async iterator,
|
|
412
|
+
* or exiting a `for await...of` iteration using a `break`, `return`, or `throw` will not destroy the stream.
|
|
413
|
+
* **Default: `true`**.
|
|
414
|
+
*/
|
|
415
|
+
iterator(options?: {destroyOnReturn?: boolean}): AsyncIterableIterator<any>;
|
|
416
|
+
/**
|
|
417
|
+
* This method allows mapping over the stream. The *fn* function will be called for every chunk in the stream.
|
|
418
|
+
* If the *fn* function returns a promise - that promise will be `await`ed before being passed to the result stream.
|
|
419
|
+
* @since v17.4.0, v16.14.0
|
|
420
|
+
* @param fn a function to map over every chunk in the stream. Async or not.
|
|
421
|
+
* @returns a stream mapped with the function *fn*.
|
|
422
|
+
*/
|
|
423
|
+
map(fn: (data: any, options?: Pick<ArrayOptions, "signal">) => any, options?: ArrayOptions): Readable;
|
|
424
|
+
/**
|
|
425
|
+
* This method allows filtering the stream. For each chunk in the stream the *fn* function will be called
|
|
426
|
+
* and if it returns a truthy value, the chunk will be passed to the result stream.
|
|
427
|
+
* If the *fn* function returns a promise - that promise will be `await`ed.
|
|
428
|
+
* @since v17.4.0, v16.14.0
|
|
429
|
+
* @param fn a function to filter chunks from the stream. Async or not.
|
|
430
|
+
* @returns a stream filtered with the predicate *fn*.
|
|
431
|
+
*/
|
|
432
|
+
filter(fn: (data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>, options?: ArrayOptions): Readable;
|
|
400
433
|
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
401
434
|
/**
|
|
402
435
|
* Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'`event (unless `emitClose` is set to `false`). After this call, the readable
|