@types/node 20.2.0 → 20.2.1
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/package.json +2 -2
- node/test.d.ts +43 -24
- node/ts4.8/test.d.ts +60 -45
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: Thu, 18 May 2023 13:32:52 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
|
|
14
14
|
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "20.2.
|
|
3
|
+
"version": "20.2.1",
|
|
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": "605a2e642a0979c9b4e6102f238e63c9667e686359383a32c94507a33a0c61a0",
|
|
236
236
|
"typeScriptVersion": "4.3"
|
|
237
237
|
}
|
node/test.d.ts
CHANGED
|
@@ -136,27 +136,20 @@ declare module 'node:test' {
|
|
|
136
136
|
function test(options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
137
137
|
function test(fn?: TestFn): Promise<void>;
|
|
138
138
|
namespace test {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Shorthand for marking a suite as `TODO`, same as `test([name], { only: true }[, fn])`.
|
|
155
|
-
*/
|
|
156
|
-
function only(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
157
|
-
function only(name?: string, fn?: TestFn): void;
|
|
158
|
-
function only(options?: TestOptions, fn?: TestFn): void;
|
|
159
|
-
function only(fn?: TestFn): void;
|
|
139
|
+
export {
|
|
140
|
+
after,
|
|
141
|
+
afterEach,
|
|
142
|
+
before,
|
|
143
|
+
beforeEach,
|
|
144
|
+
describe,
|
|
145
|
+
it,
|
|
146
|
+
run,
|
|
147
|
+
mock,
|
|
148
|
+
test,
|
|
149
|
+
skip,
|
|
150
|
+
todo,
|
|
151
|
+
only
|
|
152
|
+
};
|
|
160
153
|
}
|
|
161
154
|
/**
|
|
162
155
|
* The `describe()` function imported from the `node:test` module. Each
|
|
@@ -188,7 +181,8 @@ declare module 'node:test' {
|
|
|
188
181
|
function todo(options?: TestOptions, fn?: SuiteFn): void;
|
|
189
182
|
function todo(fn?: SuiteFn): void;
|
|
190
183
|
/**
|
|
191
|
-
* Shorthand for marking a suite as `
|
|
184
|
+
* Shorthand for marking a suite as `only`, same as `describe([name], { only: true }[, fn])`.
|
|
185
|
+
* @since v18.15.0
|
|
192
186
|
*/
|
|
193
187
|
function only(name?: string, options?: TestOptions, fn?: SuiteFn): void;
|
|
194
188
|
function only(name?: string, fn?: SuiteFn): void;
|
|
@@ -217,13 +211,38 @@ declare module 'node:test' {
|
|
|
217
211
|
function todo(options?: TestOptions, fn?: TestFn): void;
|
|
218
212
|
function todo(fn?: TestFn): void;
|
|
219
213
|
/**
|
|
220
|
-
* Shorthand for marking a
|
|
214
|
+
* Shorthand for marking a test as `only`, same as `it([name], { only: true }[, fn])`.
|
|
215
|
+
* @since v18.15.0
|
|
221
216
|
*/
|
|
222
217
|
function only(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
223
218
|
function only(name?: string, fn?: TestFn): void;
|
|
224
219
|
function only(options?: TestOptions, fn?: TestFn): void;
|
|
225
220
|
function only(fn?: TestFn): void;
|
|
226
221
|
}
|
|
222
|
+
/**
|
|
223
|
+
* Shorthand for skipping a test, same as `test([name], { skip: true }[, fn])`.
|
|
224
|
+
* @since v20.2.0
|
|
225
|
+
*/
|
|
226
|
+
function skip(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
227
|
+
function skip(name?: string, fn?: TestFn): void;
|
|
228
|
+
function skip(options?: TestOptions, fn?: TestFn): void;
|
|
229
|
+
function skip(fn?: TestFn): void;
|
|
230
|
+
/**
|
|
231
|
+
* Shorthand for marking a test as `TODO`, same as `test([name], { todo: true }[, fn])`.
|
|
232
|
+
* @since v20.2.0
|
|
233
|
+
*/
|
|
234
|
+
function todo(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
235
|
+
function todo(name?: string, fn?: TestFn): void;
|
|
236
|
+
function todo(options?: TestOptions, fn?: TestFn): void;
|
|
237
|
+
function todo(fn?: TestFn): void;
|
|
238
|
+
/**
|
|
239
|
+
* Shorthand for marking a test as `only`, same as `test([name], { only: true }[, fn])`.
|
|
240
|
+
* @since v20.2.0
|
|
241
|
+
*/
|
|
242
|
+
function only(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
243
|
+
function only(name?: string, fn?: TestFn): void;
|
|
244
|
+
function only(options?: TestOptions, fn?: TestFn): void;
|
|
245
|
+
function only(fn?: TestFn): void;
|
|
227
246
|
/**
|
|
228
247
|
* The type of a function under test. The first argument to this function is a
|
|
229
248
|
* {@link TestContext} object. If the test uses callbacks, the callback function is passed as
|
|
@@ -1025,5 +1044,5 @@ declare module 'node:test' {
|
|
|
1025
1044
|
*/
|
|
1026
1045
|
restore(): void;
|
|
1027
1046
|
}
|
|
1028
|
-
export { test as default, run, test, describe, it, before, after, beforeEach, afterEach, mock };
|
|
1047
|
+
export { test as default, run, test, describe, it, before, after, beforeEach, afterEach, mock, skip, only, todo };
|
|
1029
1048
|
}
|
node/ts4.8/test.d.ts
CHANGED
|
@@ -136,27 +136,20 @@ declare module 'node:test' {
|
|
|
136
136
|
function test(options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
137
137
|
function test(fn?: TestFn): Promise<void>;
|
|
138
138
|
namespace test {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Shorthand for marking a suite as `TODO`, same as `test([name], { only: true }[, fn])`.
|
|
155
|
-
*/
|
|
156
|
-
function only(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
157
|
-
function only(name?: string, fn?: TestFn): void;
|
|
158
|
-
function only(options?: TestOptions, fn?: TestFn): void;
|
|
159
|
-
function only(fn?: TestFn): void;
|
|
139
|
+
export {
|
|
140
|
+
after,
|
|
141
|
+
afterEach,
|
|
142
|
+
before,
|
|
143
|
+
beforeEach,
|
|
144
|
+
describe,
|
|
145
|
+
it,
|
|
146
|
+
run,
|
|
147
|
+
mock,
|
|
148
|
+
test,
|
|
149
|
+
skip,
|
|
150
|
+
todo,
|
|
151
|
+
only
|
|
152
|
+
};
|
|
160
153
|
}
|
|
161
154
|
/**
|
|
162
155
|
* The `describe()` function imported from the `node:test` module. Each
|
|
@@ -187,8 +180,10 @@ declare module 'node:test' {
|
|
|
187
180
|
function todo(name?: string, fn?: SuiteFn): void;
|
|
188
181
|
function todo(options?: TestOptions, fn?: SuiteFn): void;
|
|
189
182
|
function todo(fn?: SuiteFn): void;
|
|
183
|
+
|
|
190
184
|
/**
|
|
191
|
-
* Shorthand for marking a suite as `
|
|
185
|
+
* Shorthand for marking a suite as `only`, same as `describe([name], { only: true }[, fn])`.
|
|
186
|
+
* @since v18.15.0
|
|
192
187
|
*/
|
|
193
188
|
function only(name?: string, options?: TestOptions, fn?: SuiteFn): void;
|
|
194
189
|
function only(name?: string, fn?: SuiteFn): void;
|
|
@@ -201,29 +196,54 @@ declare module 'node:test' {
|
|
|
201
196
|
* The `it()` function is imported from the `node:test` module.
|
|
202
197
|
* @since v18.6.0, v16.17.0
|
|
203
198
|
*/
|
|
204
|
-
function it(name?: string, options?: TestOptions, fn?:
|
|
205
|
-
function it(name?: string, fn?:
|
|
206
|
-
function it(options?: TestOptions, fn?:
|
|
207
|
-
function it(fn?:
|
|
199
|
+
function it(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
200
|
+
function it(name?: string, fn?: TestFn): void;
|
|
201
|
+
function it(options?: TestOptions, fn?: TestFn): void;
|
|
202
|
+
function it(fn?: TestFn): void;
|
|
208
203
|
namespace it {
|
|
209
204
|
// Shorthand for skipping a test, same as `it([name], { skip: true }[, fn])`.
|
|
210
|
-
function skip(name?: string, options?: TestOptions, fn?:
|
|
211
|
-
function skip(name?: string, fn?:
|
|
212
|
-
function skip(options?: TestOptions, fn?:
|
|
213
|
-
function skip(fn?:
|
|
205
|
+
function skip(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
206
|
+
function skip(name?: string, fn?: TestFn): void;
|
|
207
|
+
function skip(options?: TestOptions, fn?: TestFn): void;
|
|
208
|
+
function skip(fn?: TestFn): void;
|
|
214
209
|
// Shorthand for marking a test as `TODO`, same as `it([name], { todo: true }[, fn])`.
|
|
215
|
-
function todo(name?: string, options?: TestOptions, fn?:
|
|
216
|
-
function todo(name?: string, fn?:
|
|
217
|
-
function todo(options?: TestOptions, fn?:
|
|
218
|
-
function todo(fn?:
|
|
210
|
+
function todo(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
211
|
+
function todo(name?: string, fn?: TestFn): void;
|
|
212
|
+
function todo(options?: TestOptions, fn?: TestFn): void;
|
|
213
|
+
function todo(fn?: TestFn): void;
|
|
219
214
|
/**
|
|
220
|
-
* Shorthand for marking a
|
|
215
|
+
* Shorthand for marking a test as `only`, same as `it([name], { only: true }[, fn])`.
|
|
216
|
+
* @since v18.15.0
|
|
221
217
|
*/
|
|
222
|
-
function only(name?: string, options?: TestOptions, fn?:
|
|
223
|
-
function only(name?: string, fn?:
|
|
224
|
-
function only(options?: TestOptions, fn?:
|
|
225
|
-
function only(fn?:
|
|
218
|
+
function only(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
219
|
+
function only(name?: string, fn?: TestFn): void;
|
|
220
|
+
function only(options?: TestOptions, fn?: TestFn): void;
|
|
221
|
+
function only(fn?: TestFn): void;
|
|
226
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* Shorthand for skipping a test, same as `test([name], { skip: true }[, fn])`.
|
|
225
|
+
* @since v20.2.0
|
|
226
|
+
*/
|
|
227
|
+
function skip(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
228
|
+
function skip(name?: string, fn?: TestFn): void;
|
|
229
|
+
function skip(options?: TestOptions, fn?: TestFn): void;
|
|
230
|
+
function skip(fn?: TestFn): void;
|
|
231
|
+
/**
|
|
232
|
+
* Shorthand for marking a test as `TODO`, same as `test([name], { todo: true }[, fn])`.
|
|
233
|
+
* @since v20.2.0
|
|
234
|
+
*/
|
|
235
|
+
function todo(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
236
|
+
function todo(name?: string, fn?: TestFn): void;
|
|
237
|
+
function todo(options?: TestOptions, fn?: TestFn): void;
|
|
238
|
+
function todo(fn?: TestFn): void;
|
|
239
|
+
/**
|
|
240
|
+
* Shorthand for marking a test as `only`, same as `test([name], { only: true }[, fn])`.
|
|
241
|
+
* @since v20.2.0
|
|
242
|
+
*/
|
|
243
|
+
function only(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
244
|
+
function only(name?: string, fn?: TestFn): void;
|
|
245
|
+
function only(options?: TestOptions, fn?: TestFn): void;
|
|
246
|
+
function only(fn?: TestFn): void;
|
|
227
247
|
/**
|
|
228
248
|
* The type of a function under test. The first argument to this function is a
|
|
229
249
|
* {@link TestContext} object. If the test uses callbacks, the callback function is passed as
|
|
@@ -235,11 +255,6 @@ declare module 'node:test' {
|
|
|
235
255
|
* If the test uses callbacks, the callback function is passed as an argument
|
|
236
256
|
*/
|
|
237
257
|
type SuiteFn = (done: (result?: any) => void) => void;
|
|
238
|
-
/**
|
|
239
|
-
* The type of a function under test.
|
|
240
|
-
* If the test uses callbacks, the callback function is passed as an argument
|
|
241
|
-
*/
|
|
242
|
-
type ItFn = (done: (result?: any) => void) => any;
|
|
243
258
|
interface RunOptions {
|
|
244
259
|
/**
|
|
245
260
|
* If a number is provided, then that many files would run in parallel.
|
|
@@ -1030,5 +1045,5 @@ declare module 'node:test' {
|
|
|
1030
1045
|
*/
|
|
1031
1046
|
restore(): void;
|
|
1032
1047
|
}
|
|
1033
|
-
export { test as default, run, test, describe, it, before, after, beforeEach, afterEach, mock };
|
|
1048
|
+
export { test as default, run, test, describe, it, before, after, beforeEach, afterEach, mock, skip, only, todo };
|
|
1034
1049
|
}
|