@types/node 18.15.12 → 18.15.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 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.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Wed, 19 Apr 2023 23:02:48 GMT
11
+ * Last updated: Fri, 21 Apr 2023 02:32:45 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
14
14
 
node/globals.d.ts CHANGED
@@ -63,6 +63,7 @@ interface AbortSignal extends EventTarget {
63
63
  */
64
64
  readonly aborted: boolean;
65
65
  readonly reason: any;
66
+ onabort: null | ((this: AbortSignal, event: Event) => any);
66
67
  }
67
68
 
68
69
  declare var AbortController: typeof globalThis extends {onmessage: any; AbortController: infer T}
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "18.15.12",
3
+ "version": "18.15.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",
@@ -232,6 +232,6 @@
232
232
  },
233
233
  "scripts": {},
234
234
  "dependencies": {},
235
- "typesPublisherContentHash": "073cca51adb608444e55491359ddfc342818394742589fd17722e68ed00ee4fa",
235
+ "typesPublisherContentHash": "6e44e22075a6a4c2d94c101dd844e06d49ef22f1b098d48c303504b25d812972",
236
236
  "typeScriptVersion": "4.3"
237
237
  }
node/ts4.8/globals.d.ts CHANGED
@@ -45,35 +45,42 @@ declare var gc: undefined | (() => void);
45
45
  // from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib
46
46
  /** A controller object that allows you to abort one or more DOM requests as and when desired. */
47
47
  interface AbortController {
48
- /**
49
- * Returns the AbortSignal object associated with this object.
50
- */
51
-
52
- readonly signal: AbortSignal;
53
- /**
54
- * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
55
- */
56
- abort(reason?: any): void;
48
+ /**
49
+ * Returns the AbortSignal object associated with this object.
50
+ */
51
+
52
+ readonly signal: AbortSignal;
53
+ /**
54
+ * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
55
+ */
56
+ abort(reason?: any): void;
57
57
  }
58
58
 
59
59
  /** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
60
60
  interface AbortSignal extends EventTarget {
61
- /**
62
- * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
63
- */
64
- readonly aborted: boolean;
61
+ /**
62
+ * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
63
+ */
64
+ readonly aborted: boolean;
65
+ readonly reason: any;
66
+ onabort: null | ((this: AbortSignal, event: Event) => any);
65
67
  }
66
68
 
67
- declare var AbortController: {
68
- prototype: AbortController;
69
- new(): AbortController;
70
- };
71
-
72
- declare var AbortSignal: {
73
- prototype: AbortSignal;
74
- new(): AbortSignal;
75
- // TODO: Add abort() static
76
- };
69
+ declare var AbortController: typeof globalThis extends {onmessage: any; AbortController: infer T}
70
+ ? T
71
+ : {
72
+ prototype: AbortController;
73
+ new(): AbortController;
74
+ };
75
+
76
+ declare var AbortSignal: typeof globalThis extends {onmessage: any; AbortSignal: infer T}
77
+ ? T
78
+ : {
79
+ prototype: AbortSignal;
80
+ new(): AbortSignal;
81
+ abort(reason?: any): AbortSignal;
82
+ timeout(milliseconds: number): AbortSignal;
83
+ };
77
84
  //#endregion borrowed
78
85
 
79
86
  //#region ArrayLike.at()