@types/node 20.14.8 → 20.14.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/README.md +1 -1
- node/events.d.ts +11 -27
- node/package.json +3 -3
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:
|
11
|
+
* Last updated: Tue, 25 Jun 2024 22:07:01 GMT
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
13
13
|
|
14
14
|
# Credits
|
node/events.d.ts
CHANGED
@@ -80,39 +80,24 @@ declare module "events" {
|
|
80
80
|
* Can be used to cancel awaiting events.
|
81
81
|
*/
|
82
82
|
signal?: AbortSignal | undefined;
|
83
|
-
/**
|
84
|
-
* Names of events that will end the iteration.
|
85
|
-
*/
|
86
|
-
close?: string[] | undefined;
|
87
|
-
/**
|
88
|
-
* The high watermark. The emitter is paused every time the size
|
89
|
-
* of events being buffered is higher than it. Supported only
|
90
|
-
* on emitters implementing `pause()` and `resume()` methods.
|
91
|
-
* @default `Number.MAX_SAFE_INTEGER`
|
92
|
-
*/
|
93
|
-
highWaterMark?: number | undefined;
|
94
|
-
/**
|
95
|
-
* The low watermark. The emitter is resumed every time the size of events being buffered
|
96
|
-
* is lower than it. Supported only on emitters implementing `pause()` and `resume()` methods.
|
97
|
-
* @default 1
|
98
|
-
*/
|
99
|
-
lowWaterMark?: number | undefined;
|
100
83
|
}
|
101
84
|
interface StaticEventEmitterIteratorOptions extends StaticEventEmitterOptions {
|
102
85
|
/**
|
103
86
|
* Names of events that will end the iteration.
|
104
87
|
*/
|
105
|
-
close?: string[];
|
88
|
+
close?: string[] | undefined;
|
106
89
|
/**
|
107
|
-
* The emitter is paused every time the size of events being buffered is higher than it.
|
90
|
+
* The high watermark. The emitter is paused every time the size of events being buffered is higher than it.
|
91
|
+
* Supported only on emitters implementing `pause()` and `resume()` methods.
|
108
92
|
* @default Number.MAX_SAFE_INTEGER
|
109
93
|
*/
|
110
|
-
highWaterMark?: number;
|
94
|
+
highWaterMark?: number | undefined;
|
111
95
|
/**
|
112
|
-
* The emitter is resumed every time the size of events being buffered is lower than it.
|
96
|
+
* The low watermark. The emitter is resumed every time the size of events being buffered is lower than it.
|
97
|
+
* Supported only on emitters implementing `pause()` and `resume()` methods.
|
113
98
|
* @default 1
|
114
99
|
*/
|
115
|
-
lowWaterMark?: number;
|
100
|
+
lowWaterMark?: number | undefined;
|
116
101
|
}
|
117
102
|
interface EventEmitter<T extends EventMap<T> = DefaultEventMap> extends NodeJS.EventEmitter<T> {}
|
118
103
|
type EventMap<T> = Record<keyof T, any[]> | DefaultEventMap;
|
@@ -232,7 +217,7 @@ declare module "events" {
|
|
232
217
|
static once(
|
233
218
|
emitter: NodeJS.EventEmitter,
|
234
219
|
eventName: string | symbol,
|
235
|
-
options?:
|
220
|
+
options?: StaticEventEmitterOptions,
|
236
221
|
): Promise<any[]>;
|
237
222
|
static once(emitter: EventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise<any[]>;
|
238
223
|
/**
|
@@ -313,19 +298,18 @@ declare module "events" {
|
|
313
298
|
* console.log('done'); // prints 'done'
|
314
299
|
* ```
|
315
300
|
* @since v13.6.0, v12.16.0
|
316
|
-
* @param eventName The name of the event being listened for
|
317
301
|
* @return An `AsyncIterator` that iterates `eventName` events emitted by the `emitter`
|
318
302
|
*/
|
319
303
|
static on(
|
320
304
|
emitter: NodeJS.EventEmitter,
|
321
305
|
eventName: string | symbol,
|
322
|
-
options?:
|
323
|
-
): AsyncIterableIterator<any>;
|
306
|
+
options?: StaticEventEmitterIteratorOptions,
|
307
|
+
): AsyncIterableIterator<any[]>;
|
324
308
|
static on(
|
325
309
|
emitter: EventTarget,
|
326
310
|
eventName: string,
|
327
311
|
options?: StaticEventEmitterIteratorOptions,
|
328
|
-
): AsyncIterableIterator<any>;
|
312
|
+
): AsyncIterableIterator<any[]>;
|
329
313
|
/**
|
330
314
|
* A class method that returns the number of listeners for the given `eventName` registered on the given `emitter`.
|
331
315
|
*
|
node/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/node",
|
3
|
-
"version": "20.14.
|
3
|
+
"version": "20.14.9",
|
4
4
|
"description": "TypeScript definitions for node",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
6
6
|
"license": "MIT",
|
@@ -212,6 +212,6 @@
|
|
212
212
|
"dependencies": {
|
213
213
|
"undici-types": "~5.26.4"
|
214
214
|
},
|
215
|
-
"typesPublisherContentHash": "
|
216
|
-
"typeScriptVersion": "4.
|
215
|
+
"typesPublisherContentHash": "e4d1051361599ca04bc4b8596571d29434f7b5618cadeb651672ab388dae60aa",
|
216
|
+
"typeScriptVersion": "4.8"
|
217
217
|
}
|