@types/node 20.10.3 → 20.10.5

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 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: Sun, 03 Dec 2023 18:07:12 GMT
11
+ * Last updated: Sun, 17 Dec 2023 21:35:25 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node/globals.d.ts CHANGED
@@ -234,6 +234,32 @@ declare global {
234
234
  * Is this a constructor call?
235
235
  */
236
236
  isConstructor(): boolean;
237
+
238
+ /**
239
+ * is this an async call (i.e. await, Promise.all(), or Promise.any())?
240
+ */
241
+ isAsync(): boolean;
242
+
243
+ /**
244
+ * is this an async call to Promise.all()?
245
+ */
246
+ isPromiseAll(): boolean;
247
+
248
+ /**
249
+ * returns the index of the promise element that was followed in
250
+ * Promise.all() or Promise.any() for async stack traces, or null
251
+ * if the CallSite is not an async
252
+ */
253
+ getPromiseIndex(): number | null;
254
+
255
+ getScriptNameOrSourceURL(): string;
256
+ getScriptHash(): string;
257
+
258
+ getEnclosingColumnNumber(): number;
259
+ getEnclosingLineNumber(): number;
260
+ getPosition(): number;
261
+
262
+ toString(): string;
237
263
  }
238
264
 
239
265
  interface ErrnoException extends Error {
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "20.10.3",
3
+ "version": "20.10.5",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -224,7 +224,7 @@
224
224
  "dependencies": {
225
225
  "undici-types": "~5.26.4"
226
226
  },
227
- "typesPublisherContentHash": "23bf5e20c3e989ac01a5ead7a9bd16b7752ee61c6293df790619aa6185433385",
227
+ "typesPublisherContentHash": "6dfd7431379ce9a950fc3c1f9e449887a70990e4487390b39d58be7add68a95a",
228
228
  "typeScriptVersion": "4.6",
229
229
  "nonNpm": true
230
230
  }
node/stream.d.ts CHANGED
@@ -948,7 +948,7 @@ declare module "stream" {
948
948
  highWaterMark?: number | undefined;
949
949
  objectMode?: boolean | undefined;
950
950
  construct?(this: T, callback: (error?: Error | null) => void): void;
951
- destroy?(this: T, error: Error | null, callback: (error: Error | null) => void): void;
951
+ destroy?(this: T, error: Error | null, callback: (error?: Error | null) => void): void;
952
952
  autoDestroy?: boolean | undefined;
953
953
  }
954
954
  interface ReadableOptions extends StreamOptions<Readable> {
@@ -1033,7 +1033,7 @@ declare module "stream" {
1033
1033
  callback: (error?: Error | null) => void,
1034
1034
  ): void;
1035
1035
  final?(this: Duplex, callback: (error?: Error | null) => void): void;
1036
- destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void;
1036
+ destroy?(this: Duplex, error: Error | null, callback: (error?: Error | null) => void): void;
1037
1037
  }
1038
1038
  /**
1039
1039
  * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces.
@@ -1108,7 +1108,7 @@ declare module "stream" {
1108
1108
  }>,
1109
1109
  callback: (error?: Error | null) => void,
1110
1110
  ): void;
1111
- _destroy(error: Error | null, callback: (error: Error | null) => void): void;
1111
+ _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
1112
1112
  _final(callback: (error?: Error | null) => void): void;
1113
1113
  write(chunk: any, encoding?: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean;
1114
1114
  write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
@@ -1261,7 +1261,7 @@ declare module "stream" {
1261
1261
  callback: (error?: Error | null) => void,
1262
1262
  ): void;
1263
1263
  final?(this: Transform, callback: (error?: Error | null) => void): void;
1264
- destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void;
1264
+ destroy?(this: Transform, error: Error | null, callback: (error?: Error | null) => void): void;
1265
1265
  transform?(this: Transform, chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
1266
1266
  flush?(this: Transform, callback: TransformCallback): void;
1267
1267
  }
node/ts4.8/globals.d.ts CHANGED
@@ -234,6 +234,32 @@ declare global {
234
234
  * Is this a constructor call?
235
235
  */
236
236
  isConstructor(): boolean;
237
+
238
+ /**
239
+ * is this an async call (i.e. await, Promise.all(), or Promise.any())?
240
+ */
241
+ isAsync(): boolean;
242
+
243
+ /**
244
+ * is this an async call to Promise.all()?
245
+ */
246
+ isPromiseAll(): boolean;
247
+
248
+ /**
249
+ * returns the index of the promise element that was followed in
250
+ * Promise.all() or Promise.any() for async stack traces, or null
251
+ * if the CallSite is not an async
252
+ */
253
+ getPromiseIndex(): number | null;
254
+
255
+ getScriptNameOrSourceURL(): string;
256
+ getScriptHash(): string;
257
+
258
+ getEnclosingColumnNumber(): number;
259
+ getEnclosingLineNumber(): number;
260
+ getPosition(): number;
261
+
262
+ toString(): string;
237
263
  }
238
264
 
239
265
  interface ErrnoException extends Error {
node/ts4.8/stream.d.ts CHANGED
@@ -948,7 +948,7 @@ declare module "stream" {
948
948
  highWaterMark?: number | undefined;
949
949
  objectMode?: boolean | undefined;
950
950
  construct?(this: T, callback: (error?: Error | null) => void): void;
951
- destroy?(this: T, error: Error | null, callback: (error: Error | null) => void): void;
951
+ destroy?(this: T, error: Error | null, callback: (error?: Error | null) => void): void;
952
952
  autoDestroy?: boolean | undefined;
953
953
  }
954
954
  interface ReadableOptions extends StreamOptions<Readable> {
@@ -1033,7 +1033,7 @@ declare module "stream" {
1033
1033
  callback: (error?: Error | null) => void,
1034
1034
  ): void;
1035
1035
  final?(this: Duplex, callback: (error?: Error | null) => void): void;
1036
- destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void;
1036
+ destroy?(this: Duplex, error: Error | null, callback: (error?: Error | null) => void): void;
1037
1037
  }
1038
1038
  /**
1039
1039
  * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces.
@@ -1108,7 +1108,7 @@ declare module "stream" {
1108
1108
  }>,
1109
1109
  callback: (error?: Error | null) => void,
1110
1110
  ): void;
1111
- _destroy(error: Error | null, callback: (error: Error | null) => void): void;
1111
+ _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
1112
1112
  _final(callback: (error?: Error | null) => void): void;
1113
1113
  write(chunk: any, encoding?: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean;
1114
1114
  write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
@@ -1261,7 +1261,7 @@ declare module "stream" {
1261
1261
  callback: (error?: Error | null) => void,
1262
1262
  ): void;
1263
1263
  final?(this: Transform, callback: (error?: Error | null) => void): void;
1264
- destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void;
1264
+ destroy?(this: Transform, error: Error | null, callback: (error?: Error | null) => void): void;
1265
1265
  transform?(this: Transform, chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
1266
1266
  flush?(this: Transform, callback: TransformCallback): void;
1267
1267
  }