@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 +1 -1
- node/dom-events.d.ts +4 -4
- node/globals.d.ts +15 -11
- node/package.json +2 -2
- node/querystring.d.ts +3 -3
- node/ts4.8/buffer.d.ts +2 -2
- node/ts4.8/dom-events.d.ts +4 -4
- node/ts4.8/querystring.d.ts +3 -3
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:
|
|
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:
|
|
12
|
-
?
|
|
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:
|
|
52
|
-
?
|
|
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
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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.
|
|
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": "
|
|
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
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
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:
|
|
173
|
-
?
|
|
172
|
+
type __Blob = typeof globalThis extends { onmessage: any, Blob: any }
|
|
173
|
+
? {} : NodeBlob;
|
|
174
174
|
|
|
175
175
|
global {
|
|
176
176
|
// Buffer class
|
node/ts4.8/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:
|
|
12
|
-
?
|
|
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:
|
|
52
|
-
?
|
|
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/ts4.8/querystring.d.ts
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* const querystring = require('querystring');
|
|
7
7
|
* ```
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
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' {
|