@types/node 17.0.9 → 17.0.13
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 +2 -2
- node/crypto.d.ts +1 -1
- node/events.d.ts +31 -3
- node/index.d.ts +0 -1
- node/package.json +2 -7
- node/util.d.ts +1 -1
node/README.md
CHANGED
|
@@ -8,9 +8,9 @@ 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.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Thu, 27 Jan 2022 20:31:30 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
|
|
14
14
|
|
|
15
15
|
# Credits
|
|
16
|
-
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Seth Westphal](https://github.com/westy92), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [
|
|
16
|
+
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Seth Westphal](https://github.com/westy92), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), and [wafuwafu13](https://github.com/wafuwafu13).
|
node/crypto.d.ts
CHANGED
|
@@ -250,7 +250,7 @@ declare module 'crypto' {
|
|
|
250
250
|
*/
|
|
251
251
|
function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
|
|
252
252
|
// https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
|
|
253
|
-
type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex';
|
|
253
|
+
type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex' | 'binary';
|
|
254
254
|
type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1';
|
|
255
255
|
type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2';
|
|
256
256
|
type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
|
node/events.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ declare module 'events' {
|
|
|
50
50
|
listener: (...args: any[]) => void,
|
|
51
51
|
opts?: {
|
|
52
52
|
once: boolean;
|
|
53
|
-
}
|
|
53
|
+
},
|
|
54
54
|
): any;
|
|
55
55
|
}
|
|
56
56
|
interface StaticEventEmitterOptions {
|
|
@@ -154,7 +154,11 @@ declare module 'events' {
|
|
|
154
154
|
* ```
|
|
155
155
|
* @since v11.13.0, v10.16.0
|
|
156
156
|
*/
|
|
157
|
-
static once(
|
|
157
|
+
static once(
|
|
158
|
+
emitter: NodeEventTarget,
|
|
159
|
+
eventName: string | symbol,
|
|
160
|
+
options?: StaticEventEmitterOptions,
|
|
161
|
+
): Promise<any[]>;
|
|
158
162
|
static once(emitter: DOMEventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise<any[]>;
|
|
159
163
|
/**
|
|
160
164
|
* ```js
|
|
@@ -214,7 +218,11 @@ declare module 'events' {
|
|
|
214
218
|
* @param eventName The name of the event being listened for
|
|
215
219
|
* @return that iterates `eventName` events emitted by the `emitter`
|
|
216
220
|
*/
|
|
217
|
-
static on(
|
|
221
|
+
static on(
|
|
222
|
+
emitter: NodeJS.EventEmitter,
|
|
223
|
+
eventName: string,
|
|
224
|
+
options?: StaticEventEmitterOptions,
|
|
225
|
+
): AsyncIterableIterator<any>;
|
|
218
226
|
/**
|
|
219
227
|
* A class method that returns the number of listeners for the given `eventName`registered on the given `emitter`.
|
|
220
228
|
*
|
|
@@ -260,6 +268,26 @@ declare module 'events' {
|
|
|
260
268
|
* @since v15.2.0, v14.17.0
|
|
261
269
|
*/
|
|
262
270
|
static getEventListeners(emitter: DOMEventTarget | NodeJS.EventEmitter, name: string | symbol): Function[];
|
|
271
|
+
/**
|
|
272
|
+
* By default `EventEmitter`s will print a warning if more than `10` listeners are
|
|
273
|
+
* added for a particular event. This is a useful default that helps finding
|
|
274
|
+
* memory leaks. The `EventEmitter.setMaxListeners()` method allows the default limit to be
|
|
275
|
+
* modified (if eventTargets is empty) or modify the limit specified in every `EventTarget` | `EventEmitter` passed as arguments.
|
|
276
|
+
* The value can be set to`Infinity` (or `0`) to indicate an unlimited number of listeners.
|
|
277
|
+
*
|
|
278
|
+
* ```js
|
|
279
|
+
* EventEmitter.setMaxListeners(20);
|
|
280
|
+
* // Equivalent to
|
|
281
|
+
* EventEmitter.defaultMaxListeners = 20;
|
|
282
|
+
*
|
|
283
|
+
* const eventTarget = new EventTarget();
|
|
284
|
+
* // Only way to increase limit for `EventTarget` instances
|
|
285
|
+
* // as these doesn't expose its own `setMaxListeners` method
|
|
286
|
+
* EventEmitter.setMaxListeners(20, eventTarget);
|
|
287
|
+
* ```
|
|
288
|
+
* @since v15.3.0, v14.17.0
|
|
289
|
+
*/
|
|
290
|
+
static setMaxListeners(n?: number, ...eventTargets: Array<DOMEventTarget | NodeJS.EventEmitter>): void;
|
|
263
291
|
/**
|
|
264
292
|
* This symbol shall be used to install a listener for only monitoring `'error'`
|
|
265
293
|
* events. Listeners installed using this symbol are called before the regular
|
node/index.d.ts
CHANGED
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
// Junxiao Shi <https://github.com/yoursunny>
|
|
35
35
|
// Ilia Baryshnikov <https://github.com/qwelias>
|
|
36
36
|
// ExE Boss <https://github.com/ExE-Boss>
|
|
37
|
-
// Surasak Chaisurin <https://github.com/Ryan-Willpower>
|
|
38
37
|
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
|
39
38
|
// Anna Henningsen <https://github.com/addaleax>
|
|
40
39
|
// Victor Perin <https://github.com/victorperin>
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.13",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -175,11 +175,6 @@
|
|
|
175
175
|
"url": "https://github.com/ExE-Boss",
|
|
176
176
|
"githubUsername": "ExE-Boss"
|
|
177
177
|
},
|
|
178
|
-
{
|
|
179
|
-
"name": "Surasak Chaisurin",
|
|
180
|
-
"url": "https://github.com/Ryan-Willpower",
|
|
181
|
-
"githubUsername": "Ryan-Willpower"
|
|
182
|
-
},
|
|
183
178
|
{
|
|
184
179
|
"name": "Piotr Błażejewicz",
|
|
185
180
|
"url": "https://github.com/peterblazejewicz",
|
|
@@ -225,6 +220,6 @@
|
|
|
225
220
|
},
|
|
226
221
|
"scripts": {},
|
|
227
222
|
"dependencies": {},
|
|
228
|
-
"typesPublisherContentHash": "
|
|
223
|
+
"typesPublisherContentHash": "9bb87f550fbe63454ad9588c0e9123a36bfa55232062afbc431a3498525daf94",
|
|
229
224
|
"typeScriptVersion": "3.8"
|
|
230
225
|
}
|
node/util.d.ts
CHANGED
|
@@ -317,7 +317,7 @@ declare module 'util' {
|
|
|
317
317
|
* @return The representation of `object`.
|
|
318
318
|
*/
|
|
319
319
|
export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
|
|
320
|
-
export function inspect(object: any, options
|
|
320
|
+
export function inspect(object: any, options?: InspectOptions): string;
|
|
321
321
|
export namespace inspect {
|
|
322
322
|
let colors: NodeJS.Dict<[number, number]>;
|
|
323
323
|
let styles: {
|