@types/node 18.11.0 → 18.11.2

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: Fri, 14 Oct 2022 20:32:59 GMT
11
+ * Last updated: Tue, 18 Oct 2022 22:03:06 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
14
14
 
node/dom-events.d.ts CHANGED
@@ -8,8 +8,8 @@ export {}; // Don't export anything!
8
8
 
9
9
  // This conditional type will be the existing global Event in a browser, or
10
10
  // the copy below in a Node environment.
11
- type __Event = typeof globalThis extends { onmessage: any, Event: infer T }
12
- ? T
11
+ type __Event = typeof globalThis extends { onmessage: any, Event: any }
12
+ ? {}
13
13
  : {
14
14
  /** This is not used in Node.js and is provided purely for completeness. */
15
15
  readonly bubbles: boolean;
@@ -48,8 +48,8 @@ type __Event = typeof globalThis extends { onmessage: any, Event: infer T }
48
48
  };
49
49
 
50
50
  // See comment above explaining conditional type
51
- type __EventTarget = typeof globalThis extends { onmessage: any, EventTarget: infer T }
52
- ? T
51
+ type __EventTarget = typeof globalThis extends { onmessage: any, EventTarget: any }
52
+ ? {}
53
53
  : {
54
54
  /**
55
55
  * Adds a new handler for the `type` event. Any given `listener` is added only once per `type` and per `capture` option value.
node/globals.d.ts CHANGED
@@ -64,17 +64,21 @@ interface AbortSignal extends EventTarget {
64
64
  readonly aborted: boolean;
65
65
  }
66
66
 
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
- timeout(milliseconds: number): AbortSignal;
77
- };
67
+ declare var AbortController: typeof globalThis extends {onmessage: any; AbortController: infer T}
68
+ ? T
69
+ : {
70
+ prototype: AbortController;
71
+ new(): AbortController;
72
+ };
73
+
74
+ declare var AbortSignal: typeof globalThis extends {onmessage: any; AbortSignal: infer T}
75
+ ? T
76
+ : {
77
+ prototype: AbortSignal;
78
+ new(): AbortSignal;
79
+ // TODO: Add abort() static
80
+ timeout(milliseconds: number): AbortSignal;
81
+ };
78
82
  //#endregion borrowed
79
83
 
80
84
  //#region ArrayLike.at()
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "18.11.0",
3
+ "version": "18.11.2",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -227,6 +227,6 @@
227
227
  },
228
228
  "scripts": {},
229
229
  "dependencies": {},
230
- "typesPublisherContentHash": "bec614c152bf72c7a29b996ba58cf8e86e92e1371bf820fac0654a49a16fce5f",
230
+ "typesPublisherContentHash": "d7bbee366053005eb9ad76ecf711181a2633097e3afe20ba0ac3309f73d09afc",
231
231
  "typeScriptVersion": "4.1"
232
232
  }
node/querystring.d.ts CHANGED
@@ -6,9 +6,9 @@
6
6
  * const querystring = require('querystring');
7
7
  * ```
8
8
  *
9
- * The `querystring` API is considered Legacy. While it is still maintained,
10
- * new code should use the `URLSearchParams` API instead.
11
- * @deprecated Legacy
9
+ * `querystring` is more performant than `URLSearchParams` but is not a
10
+ * standardized API. Use `URLSearchParams` when performance is not critical
11
+ * or when compatibility with browser code is desirable.
12
12
  * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/querystring.js)
13
13
  */
14
14
  declare module 'querystring' {
node/ts4.8/buffer.d.ts CHANGED
@@ -169,8 +169,8 @@ declare module 'buffer' {
169
169
  import { Blob as NodeBlob } from 'buffer';
170
170
  // This conditional type will be the existing global Blob in a browser, or
171
171
  // the copy below in a Node environment.
172
- type __Blob = typeof globalThis extends { onmessage: any, Blob: infer T }
173
- ? T : NodeBlob;
172
+ type __Blob = typeof globalThis extends { onmessage: any, Blob: any }
173
+ ? {} : NodeBlob;
174
174
 
175
175
  global {
176
176
  // Buffer class
@@ -8,8 +8,8 @@ export {}; // Don't export anything!
8
8
 
9
9
  // This conditional type will be the existing global Event in a browser, or
10
10
  // the copy below in a Node environment.
11
- type __Event = typeof globalThis extends { onmessage: any, Event: infer T }
12
- ? T
11
+ type __Event = typeof globalThis extends { onmessage: any, Event: any }
12
+ ? {}
13
13
  : {
14
14
  /** This is not used in Node.js and is provided purely for completeness. */
15
15
  readonly bubbles: boolean;
@@ -48,8 +48,8 @@ type __Event = typeof globalThis extends { onmessage: any, Event: infer T }
48
48
  };
49
49
 
50
50
  // See comment above explaining conditional type
51
- type __EventTarget = typeof globalThis extends { onmessage: any, EventTarget: infer T }
52
- ? T
51
+ type __EventTarget = typeof globalThis extends { onmessage: any, EventTarget: any }
52
+ ? {}
53
53
  : {
54
54
  /**
55
55
  * Adds a new handler for the `type` event. Any given `listener` is added only once per `type` and per `capture` option value.
@@ -6,9 +6,9 @@
6
6
  * const querystring = require('querystring');
7
7
  * ```
8
8
  *
9
- * The `querystring` API is considered Legacy. While it is still maintained,
10
- * new code should use the `URLSearchParams` API instead.
11
- * @deprecated Legacy
9
+ * `querystring` is more performant than `URLSearchParams` but is not a
10
+ * standardized API. Use `URLSearchParams` when performance is not critical
11
+ * or when compatibility with browser code is desirable.
12
12
  * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/querystring.js)
13
13
  */
14
14
  declare module 'querystring' {