@types/node 20.14.4 → 20.14.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.
- node/README.md +1 -1
- node/dns/promises.d.ts +25 -23
- node/dns.d.ts +23 -23
- node/events.d.ts +39 -1
- node/package.json +2 -2
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: Wed, 19 Jun 2024 16:07:46 GMT
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
13
13
|
|
14
14
|
# Credits
|
node/dns/promises.d.ts
CHANGED
@@ -360,30 +360,32 @@ declare module "dns/promises" {
|
|
360
360
|
* @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
|
361
361
|
*/
|
362
362
|
function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
|
363
|
-
|
364
|
-
const
|
365
|
-
const
|
366
|
-
const
|
367
|
-
const
|
368
|
-
const
|
369
|
-
const
|
370
|
-
const
|
371
|
-
const
|
372
|
-
const
|
373
|
-
const
|
374
|
-
const
|
363
|
+
// Error codes
|
364
|
+
const NODATA: "ENODATA";
|
365
|
+
const FORMERR: "EFORMERR";
|
366
|
+
const SERVFAIL: "ESERVFAIL";
|
367
|
+
const NOTFOUND: "ENOTFOUND";
|
368
|
+
const NOTIMP: "ENOTIMP";
|
369
|
+
const REFUSED: "EREFUSED";
|
370
|
+
const BADQUERY: "EBADQUERY";
|
371
|
+
const BADNAME: "EBADNAME";
|
372
|
+
const BADFAMILY: "EBADFAMILY";
|
373
|
+
const BADRESP: "EBADRESP";
|
374
|
+
const CONNREFUSED: "ECONNREFUSED";
|
375
|
+
const TIMEOUT: "ETIMEOUT";
|
375
376
|
const EOF: "EOF";
|
376
|
-
const FILE: "
|
377
|
-
const NOMEM: "
|
378
|
-
const DESTRUCTION: "
|
379
|
-
const BADSTR: "
|
380
|
-
const BADFLAGS: "
|
381
|
-
const NONAME: "
|
382
|
-
const BADHINTS: "
|
383
|
-
const NOTINITIALIZED: "
|
384
|
-
const LOADIPHLPAPI: "
|
385
|
-
const ADDRGETNETWORKPARAMS: "
|
386
|
-
const CANCELLED: "
|
377
|
+
const FILE: "EFILE";
|
378
|
+
const NOMEM: "ENOMEM";
|
379
|
+
const DESTRUCTION: "EDESTRUCTION";
|
380
|
+
const BADSTR: "EBADSTR";
|
381
|
+
const BADFLAGS: "EBADFLAGS";
|
382
|
+
const NONAME: "ENONAME";
|
383
|
+
const BADHINTS: "EBADHINTS";
|
384
|
+
const NOTINITIALIZED: "ENOTINITIALIZED";
|
385
|
+
const LOADIPHLPAPI: "ELOADIPHLPAPI";
|
386
|
+
const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS";
|
387
|
+
const CANCELLED: "ECANCELLED";
|
388
|
+
|
387
389
|
/**
|
388
390
|
* An independent resolver for DNS requests.
|
389
391
|
*
|
node/dns.d.ts
CHANGED
@@ -743,30 +743,30 @@ declare module "dns" {
|
|
743
743
|
*/
|
744
744
|
export function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
|
745
745
|
// Error codes
|
746
|
-
export const NODATA: "
|
747
|
-
export const FORMERR: "
|
748
|
-
export const SERVFAIL: "
|
749
|
-
export const NOTFOUND: "
|
750
|
-
export const NOTIMP: "
|
751
|
-
export const REFUSED: "
|
752
|
-
export const BADQUERY: "
|
753
|
-
export const BADNAME: "
|
754
|
-
export const BADFAMILY: "
|
755
|
-
export const BADRESP: "
|
756
|
-
export const CONNREFUSED: "
|
757
|
-
export const TIMEOUT: "
|
746
|
+
export const NODATA: "ENODATA";
|
747
|
+
export const FORMERR: "EFORMERR";
|
748
|
+
export const SERVFAIL: "ESERVFAIL";
|
749
|
+
export const NOTFOUND: "ENOTFOUND";
|
750
|
+
export const NOTIMP: "ENOTIMP";
|
751
|
+
export const REFUSED: "EREFUSED";
|
752
|
+
export const BADQUERY: "EBADQUERY";
|
753
|
+
export const BADNAME: "EBADNAME";
|
754
|
+
export const BADFAMILY: "EBADFAMILY";
|
755
|
+
export const BADRESP: "EBADRESP";
|
756
|
+
export const CONNREFUSED: "ECONNREFUSED";
|
757
|
+
export const TIMEOUT: "ETIMEOUT";
|
758
758
|
export const EOF: "EOF";
|
759
|
-
export const FILE: "
|
760
|
-
export const NOMEM: "
|
761
|
-
export const DESTRUCTION: "
|
762
|
-
export const BADSTR: "
|
763
|
-
export const BADFLAGS: "
|
764
|
-
export const NONAME: "
|
765
|
-
export const BADHINTS: "
|
766
|
-
export const NOTINITIALIZED: "
|
767
|
-
export const LOADIPHLPAPI: "
|
768
|
-
export const ADDRGETNETWORKPARAMS: "
|
769
|
-
export const CANCELLED: "
|
759
|
+
export const FILE: "EFILE";
|
760
|
+
export const NOMEM: "ENOMEM";
|
761
|
+
export const DESTRUCTION: "EDESTRUCTION";
|
762
|
+
export const BADSTR: "EBADSTR";
|
763
|
+
export const BADFLAGS: "EBADFLAGS";
|
764
|
+
export const NONAME: "ENONAME";
|
765
|
+
export const BADHINTS: "EBADHINTS";
|
766
|
+
export const NOTINITIALIZED: "ENOTINITIALIZED";
|
767
|
+
export const LOADIPHLPAPI: "ELOADIPHLPAPI";
|
768
|
+
export const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS";
|
769
|
+
export const CANCELLED: "ECANCELLED";
|
770
770
|
export interface ResolverOptions {
|
771
771
|
/**
|
772
772
|
* Query timeout in milliseconds, or `-1` to use the default timeout.
|
node/events.d.ts
CHANGED
@@ -98,6 +98,22 @@ declare module "events" {
|
|
98
98
|
*/
|
99
99
|
lowWaterMark?: number | undefined;
|
100
100
|
}
|
101
|
+
interface StaticEventEmitterIteratorOptions extends StaticEventEmitterOptions {
|
102
|
+
/**
|
103
|
+
* Names of events that will end the iteration.
|
104
|
+
*/
|
105
|
+
close?: string[];
|
106
|
+
/**
|
107
|
+
* The emitter is paused every time the size of events being buffered is higher than it. Supported only on emitters implementing pause() and resume() methods.
|
108
|
+
* @default Number.MAX_SAFE_INTEGER
|
109
|
+
*/
|
110
|
+
highWaterMark?: number;
|
111
|
+
/**
|
112
|
+
* The emitter is resumed every time the size of events being buffered is lower than it. Supported only on emitters implementing pause() and resume() methods.
|
113
|
+
* @default 1
|
114
|
+
*/
|
115
|
+
lowWaterMark?: number;
|
116
|
+
}
|
101
117
|
interface EventEmitter<T extends EventMap<T> = DefaultEventMap> extends NodeJS.EventEmitter<T> {}
|
102
118
|
type EventMap<T> = Record<keyof T, any[]> | DefaultEventMap;
|
103
119
|
type DefaultEventMap = [never];
|
@@ -274,6 +290,28 @@ declare module "events" {
|
|
274
290
|
*
|
275
291
|
* process.nextTick(() => ac.abort());
|
276
292
|
* ```
|
293
|
+
*
|
294
|
+
* Use the `close` option to specify an array of event names that will end the iteration:
|
295
|
+
*
|
296
|
+
* ```js
|
297
|
+
* import { on, EventEmitter } from 'node:events';
|
298
|
+
* import process from 'node:process';
|
299
|
+
*
|
300
|
+
* const ee = new EventEmitter();
|
301
|
+
*
|
302
|
+
* // Emit later on
|
303
|
+
* process.nextTick(() => {
|
304
|
+
* ee.emit('foo', 'bar');
|
305
|
+
* ee.emit('foo', 42);
|
306
|
+
* ee.emit('close');
|
307
|
+
* });
|
308
|
+
*
|
309
|
+
* for await (const event of on(ee, 'foo', { close: ['close'] })) {
|
310
|
+
* console.log(event); // prints ['bar'] [42]
|
311
|
+
* }
|
312
|
+
* // the loop will exit after 'close' is emitted
|
313
|
+
* console.log('done'); // prints 'done'
|
314
|
+
* ```
|
277
315
|
* @since v13.6.0, v12.16.0
|
278
316
|
* @param eventName The name of the event being listened for
|
279
317
|
* @return An `AsyncIterator` that iterates `eventName` events emitted by the `emitter`
|
@@ -286,7 +324,7 @@ declare module "events" {
|
|
286
324
|
static on(
|
287
325
|
emitter: EventTarget,
|
288
326
|
eventName: string,
|
289
|
-
options?:
|
327
|
+
options?: StaticEventEmitterIteratorOptions,
|
290
328
|
): AsyncIterableIterator<any>;
|
291
329
|
/**
|
292
330
|
* A class method that returns the number of listeners for the given `eventName` registered on the given `emitter`.
|
node/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/node",
|
3
|
-
"version": "20.14.
|
3
|
+
"version": "20.14.6",
|
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": "
|
215
|
+
"typesPublisherContentHash": "7ad87ee86165e98ba92d3e3f4bd58e162ffc58fa84208518416853f7f0f704fc",
|
216
216
|
"typeScriptVersion": "4.7"
|
217
217
|
}
|