@types/node 20.1.4 → 20.1.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/globals.d.ts +1 -0
- node/package.json +2 -2
- node/test.d.ts +12 -17
- node/ts4.8/globals.d.ts +1 -0
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, 16 May 2023 19:02:56 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
|
@@ -64,6 +64,7 @@ interface AbortSignal extends EventTarget {
|
|
|
64
64
|
readonly aborted: boolean;
|
|
65
65
|
readonly reason: any;
|
|
66
66
|
onabort: null | ((this: AbortSignal, event: Event) => any);
|
|
67
|
+
throwIfAborted(): void;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
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": "20.1.
|
|
3
|
+
"version": "20.1.6",
|
|
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": "
|
|
235
|
+
"typesPublisherContentHash": "509a0204e10c890c40b8b7fd4701c49bd03eff7896ae661270ae2601e846460b",
|
|
236
236
|
"typeScriptVersion": "4.3"
|
|
237
237
|
}
|
node/test.d.ts
CHANGED
|
@@ -171,21 +171,21 @@ declare module 'node:test' {
|
|
|
171
171
|
* The `it()` function is imported from the `node:test` module.
|
|
172
172
|
* @since v18.6.0, v16.17.0
|
|
173
173
|
*/
|
|
174
|
-
function it(name?: string, options?: TestOptions, fn?:
|
|
175
|
-
function it(name?: string, fn?:
|
|
176
|
-
function it(options?: TestOptions, fn?:
|
|
177
|
-
function it(fn?:
|
|
174
|
+
function it(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
175
|
+
function it(name?: string, fn?: TestFn): void;
|
|
176
|
+
function it(options?: TestOptions, fn?: TestFn): void;
|
|
177
|
+
function it(fn?: TestFn): void;
|
|
178
178
|
namespace it {
|
|
179
179
|
// Shorthand for skipping a test, same as `it([name], { skip: true }[, fn])`.
|
|
180
|
-
function skip(name?: string, options?: TestOptions, fn?:
|
|
181
|
-
function skip(name?: string, fn?:
|
|
182
|
-
function skip(options?: TestOptions, fn?:
|
|
183
|
-
function skip(fn?:
|
|
180
|
+
function skip(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
181
|
+
function skip(name?: string, fn?: TestFn): void;
|
|
182
|
+
function skip(options?: TestOptions, fn?: TestFn): void;
|
|
183
|
+
function skip(fn?: TestFn): void;
|
|
184
184
|
// Shorthand for marking a test as `TODO`, same as `it([name], { todo: true }[, fn])`.
|
|
185
|
-
function todo(name?: string, options?: TestOptions, fn?:
|
|
186
|
-
function todo(name?: string, fn?:
|
|
187
|
-
function todo(options?: TestOptions, fn?:
|
|
188
|
-
function todo(fn?:
|
|
185
|
+
function todo(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
186
|
+
function todo(name?: string, fn?: TestFn): void;
|
|
187
|
+
function todo(options?: TestOptions, fn?: TestFn): void;
|
|
188
|
+
function todo(fn?: TestFn): void;
|
|
189
189
|
}
|
|
190
190
|
/**
|
|
191
191
|
* The type of a function under test. The first argument to this function is a
|
|
@@ -198,11 +198,6 @@ declare module 'node:test' {
|
|
|
198
198
|
* If the test uses callbacks, the callback function is passed as an argument
|
|
199
199
|
*/
|
|
200
200
|
type SuiteFn = (done: (result?: any) => void) => void;
|
|
201
|
-
/**
|
|
202
|
-
* The type of a function under test.
|
|
203
|
-
* If the test uses callbacks, the callback function is passed as an argument
|
|
204
|
-
*/
|
|
205
|
-
type ItFn = (done: (result?: any) => void) => any;
|
|
206
201
|
interface RunOptions {
|
|
207
202
|
/**
|
|
208
203
|
* If a number is provided, then that many files would run in parallel.
|
node/ts4.8/globals.d.ts
CHANGED
|
@@ -64,6 +64,7 @@ interface AbortSignal extends EventTarget {
|
|
|
64
64
|
readonly aborted: boolean;
|
|
65
65
|
readonly reason: any;
|
|
66
66
|
onabort: null | ((this: AbortSignal, event: Event) => any);
|
|
67
|
+
throwIfAborted(): void;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
declare var AbortController: typeof globalThis extends {onmessage: any; AbortController: infer T}
|