@types/node 18.17.1 → 18.17.3
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 v18.17/README.md +1 -1
- node v18.17/package.json +2 -2
- node v18.17/test.d.ts +49 -4
- node v18.17/ts4.8/test.d.ts +35 -4
node v18.17/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/v18.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Sat, 05 Aug 2023 10:32:51 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
|
|
14
14
|
|
node v18.17/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "18.17.
|
|
3
|
+
"version": "18.17.3",
|
|
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": "fd8131de2838678dcddea2bb1d0c4954c584e4e1ca0ff7f65d775ba27d866b82",
|
|
236
236
|
"typeScriptVersion": "4.3"
|
|
237
237
|
}
|
node v18.17/test.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* @see [source](https://github.com/nodejs/node/blob/v18.x/lib/test.js)
|
|
4
4
|
*/
|
|
5
5
|
declare module 'node:test' {
|
|
6
|
+
import { AsyncResource } from 'node:async_hooks';
|
|
6
7
|
/**
|
|
7
8
|
* Programmatically start the test runner.
|
|
8
9
|
* @since v18.9.0
|
|
@@ -205,6 +206,19 @@ declare module 'node:test' {
|
|
|
205
206
|
* incremented from the primary's `process.debugPort`.
|
|
206
207
|
*/
|
|
207
208
|
inspectPort?: number | (() => number) | undefined;
|
|
209
|
+
/**
|
|
210
|
+
* A function that accepts the TestsStream instance and can be used to setup listeners before any tests are run.
|
|
211
|
+
*/
|
|
212
|
+
setup?: (root: Test) => void | Promise<void>;
|
|
213
|
+
}
|
|
214
|
+
class Test extends AsyncResource {
|
|
215
|
+
concurrency: number;
|
|
216
|
+
nesting: number;
|
|
217
|
+
only: boolean;
|
|
218
|
+
reporter: TestsStream;
|
|
219
|
+
runOnlySubtests: boolean;
|
|
220
|
+
testNumber: number;
|
|
221
|
+
timeout: number | null;
|
|
208
222
|
}
|
|
209
223
|
|
|
210
224
|
/**
|
|
@@ -737,7 +751,7 @@ interface TestFail {
|
|
|
737
751
|
/**
|
|
738
752
|
* The duration of the test in milliseconds.
|
|
739
753
|
*/
|
|
740
|
-
|
|
754
|
+
duration_ms: number;
|
|
741
755
|
/**
|
|
742
756
|
* The error thrown by the test.
|
|
743
757
|
*/
|
|
@@ -776,7 +790,7 @@ interface TestPass {
|
|
|
776
790
|
/**
|
|
777
791
|
* The duration of the test in milliseconds.
|
|
778
792
|
*/
|
|
779
|
-
|
|
793
|
+
duration_ms: number;
|
|
780
794
|
};
|
|
781
795
|
/**
|
|
782
796
|
* The test name.
|
|
@@ -851,6 +865,34 @@ interface TestStdout {
|
|
|
851
865
|
*/
|
|
852
866
|
message: string;
|
|
853
867
|
}
|
|
868
|
+
interface TestEnqueue {
|
|
869
|
+
/**
|
|
870
|
+
* The test name
|
|
871
|
+
*/
|
|
872
|
+
name: string;
|
|
873
|
+
/**
|
|
874
|
+
* The path of the test file, undefined if test is not ran through a file.
|
|
875
|
+
*/
|
|
876
|
+
file?: string;
|
|
877
|
+
/**
|
|
878
|
+
* The nesting level of the test.
|
|
879
|
+
*/
|
|
880
|
+
nesting: number;
|
|
881
|
+
}
|
|
882
|
+
interface TestDequeue {
|
|
883
|
+
/**
|
|
884
|
+
* The test name
|
|
885
|
+
*/
|
|
886
|
+
name: string;
|
|
887
|
+
/**
|
|
888
|
+
* The path of the test file, undefined if test is not ran through a file.
|
|
889
|
+
*/
|
|
890
|
+
file?: string;
|
|
891
|
+
/**
|
|
892
|
+
* The nesting level of the test.
|
|
893
|
+
*/
|
|
894
|
+
nesting: number;
|
|
895
|
+
}
|
|
854
896
|
|
|
855
897
|
/**
|
|
856
898
|
* The `node:test/reporters` module exposes the builtin-reporters for `node:test`.
|
|
@@ -879,7 +921,10 @@ declare module 'node:test/reporters' {
|
|
|
879
921
|
| { type: 'test:plan', data: TestPlan }
|
|
880
922
|
| { type: 'test:start', data: TestStart }
|
|
881
923
|
| { type: 'test:stderr', data: TestStderr }
|
|
882
|
-
| { type: 'test:stdout', data: TestStdout }
|
|
924
|
+
| { type: 'test:stdout', data: TestStdout }
|
|
925
|
+
| { type: 'test:enqueue'; data: TestEnqueue }
|
|
926
|
+
| { type: 'test:dequeue'; data: TestDequeue }
|
|
927
|
+
| { type: 'test:watch:drained' };
|
|
883
928
|
type TestEventGenerator = AsyncGenerator<TestEvent, void>;
|
|
884
929
|
|
|
885
930
|
/**
|
|
@@ -898,5 +943,5 @@ declare module 'node:test/reporters' {
|
|
|
898
943
|
class Spec extends Transform {
|
|
899
944
|
constructor();
|
|
900
945
|
}
|
|
901
|
-
export { dot, tap, Spec as spec };
|
|
946
|
+
export { dot, tap, Spec as spec, TestEvent };
|
|
902
947
|
}
|
node v18.17/ts4.8/test.d.ts
CHANGED
|
@@ -737,7 +737,7 @@ interface TestFail {
|
|
|
737
737
|
/**
|
|
738
738
|
* The duration of the test in milliseconds.
|
|
739
739
|
*/
|
|
740
|
-
|
|
740
|
+
duration_ms: number;
|
|
741
741
|
/**
|
|
742
742
|
* The error thrown by the test.
|
|
743
743
|
*/
|
|
@@ -776,7 +776,7 @@ interface TestPass {
|
|
|
776
776
|
/**
|
|
777
777
|
* The duration of the test in milliseconds.
|
|
778
778
|
*/
|
|
779
|
-
|
|
779
|
+
duration_ms: number;
|
|
780
780
|
};
|
|
781
781
|
/**
|
|
782
782
|
* The test name.
|
|
@@ -851,6 +851,34 @@ interface TestStdout {
|
|
|
851
851
|
*/
|
|
852
852
|
message: string;
|
|
853
853
|
}
|
|
854
|
+
interface TestEnqueue {
|
|
855
|
+
/**
|
|
856
|
+
* The test name
|
|
857
|
+
*/
|
|
858
|
+
name: string;
|
|
859
|
+
/**
|
|
860
|
+
* The path of the test file, undefined if test is not ran through a file.
|
|
861
|
+
*/
|
|
862
|
+
file?: string;
|
|
863
|
+
/**
|
|
864
|
+
* The nesting level of the test.
|
|
865
|
+
*/
|
|
866
|
+
nesting: number;
|
|
867
|
+
}
|
|
868
|
+
interface TestDequeue {
|
|
869
|
+
/**
|
|
870
|
+
* The test name
|
|
871
|
+
*/
|
|
872
|
+
name: string;
|
|
873
|
+
/**
|
|
874
|
+
* The path of the test file, undefined if test is not ran through a file.
|
|
875
|
+
*/
|
|
876
|
+
file?: string;
|
|
877
|
+
/**
|
|
878
|
+
* The nesting level of the test.
|
|
879
|
+
*/
|
|
880
|
+
nesting: number;
|
|
881
|
+
}
|
|
854
882
|
|
|
855
883
|
/**
|
|
856
884
|
* The `node:test/reporters` module exposes the builtin-reporters for `node:test`.
|
|
@@ -879,7 +907,10 @@ declare module 'node:test/reporters' {
|
|
|
879
907
|
| { type: 'test:plan', data: TestPlan }
|
|
880
908
|
| { type: 'test:start', data: TestStart }
|
|
881
909
|
| { type: 'test:stderr', data: TestStderr }
|
|
882
|
-
| { type: 'test:stdout', data: TestStdout }
|
|
910
|
+
| { type: 'test:stdout', data: TestStdout }
|
|
911
|
+
| { type: 'test:enqueue'; data: TestEnqueue }
|
|
912
|
+
| { type: 'test:dequeue'; data: TestDequeue }
|
|
913
|
+
| { type: 'test:watch:drained' };
|
|
883
914
|
type TestEventGenerator = AsyncGenerator<TestEvent, void>;
|
|
884
915
|
|
|
885
916
|
/**
|
|
@@ -898,5 +929,5 @@ declare module 'node:test/reporters' {
|
|
|
898
929
|
class Spec extends Transform {
|
|
899
930
|
constructor();
|
|
900
931
|
}
|
|
901
|
-
export { dot, tap, Spec as spec };
|
|
932
|
+
export { dot, tap, Spec as spec, TestEvent };
|
|
902
933
|
}
|