@types/node 18.16.12 → 18.16.14

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.16/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: Tue, 16 May 2023 20:02:58 GMT
11
+ * Last updated: Sun, 21 May 2023 21:02:54 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.16/buffer.d.ts CHANGED
@@ -202,6 +202,9 @@ declare module 'buffer' {
202
202
  // the copy below in a Node environment.
203
203
  type __Blob = typeof globalThis extends { onmessage: any; Blob: infer T } ? T : NodeBlob;
204
204
  global {
205
+ namespace NodeJS {
206
+ export { BufferEncoding };
207
+ }
205
208
  // Buffer class
206
209
  type BufferEncoding =
207
210
  | 'ascii'
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "18.16.12",
3
+ "version": "18.16.14",
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": "7c20ac05a7cff74f5cda49e8abedbe53c1f3d2596bb8184998891ce7fe82e0c5",
235
+ "typesPublisherContentHash": "1ddc18d0b32383ce71e84dee2d8cf940cfad390444fd7248f2435c57f7d2c2b4",
236
236
  "typeScriptVersion": "4.3"
237
237
  }
node v18.16/test.d.ts CHANGED
@@ -10,7 +10,6 @@ declare module 'node:test' {
10
10
  * @returns A {@link TestsStream} that emits events about the test execution.
11
11
  */
12
12
  function run(options?: RunOptions): TestsStream;
13
-
14
13
  /**
15
14
  * The `test()` function is the value imported from the test module. Each invocation of this
16
15
  * function results in reporting the test to the {@link TestsStream}.
@@ -49,7 +48,19 @@ declare module 'node:test' {
49
48
  function test(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
50
49
  function test(options?: TestOptions, fn?: TestFn): Promise<void>;
51
50
  function test(fn?: TestFn): Promise<void>;
52
-
51
+ namespace test {
52
+ export {
53
+ after,
54
+ afterEach,
55
+ before,
56
+ beforeEach,
57
+ describe,
58
+ it,
59
+ run,
60
+ mock,
61
+ test
62
+ };
63
+ }
53
64
  /**
54
65
  * @since v18.6.0
55
66
  * @param name The name of the suite, which is displayed when reporting suite results.
@@ -73,6 +84,15 @@ declare module 'node:test' {
73
84
  function todo(name?: string, fn?: SuiteFn): void;
74
85
  function todo(options?: TestOptions, fn?: SuiteFn): void;
75
86
  function todo(fn?: SuiteFn): void;
87
+
88
+ /**
89
+ * Shorthand for marking a suite as `only`, same as `describe([name], { only: true }[, fn])`.
90
+ * @since v18.15.0
91
+ */
92
+ function only(name?: string, options?: TestOptions, fn?: SuiteFn): void;
93
+ function only(name?: string, fn?: SuiteFn): void;
94
+ function only(options?: TestOptions, fn?: SuiteFn): void;
95
+ function only(fn?: SuiteFn): void;
76
96
  }
77
97
 
78
98
  /**
@@ -99,6 +119,15 @@ declare module 'node:test' {
99
119
  function todo(name?: string, fn?: TestFn): void;
100
120
  function todo(options?: TestOptions, fn?: TestFn): void;
101
121
  function todo(fn?: TestFn): void;
122
+
123
+ /**
124
+ * Shorthand for marking a test as `only`, same as `it([name], { only: true }[, fn])`.
125
+ * @since v18.15.0
126
+ */
127
+ function only(name?: string, options?: TestOptions, fn?: TestFn): void;
128
+ function only(name?: string, fn?: TestFn): void;
129
+ function only(options?: TestOptions, fn?: TestFn): void;
130
+ function only(fn?: TestFn): void;
102
131
  }
103
132
 
104
133
  /**
@@ -202,6 +202,9 @@ declare module 'buffer' {
202
202
  // the copy below in a Node environment.
203
203
  type __Blob = typeof globalThis extends { onmessage: any; Blob: infer T } ? T : NodeBlob;
204
204
  global {
205
+ namespace NodeJS {
206
+ export { BufferEncoding };
207
+ }
205
208
  // Buffer class
206
209
  type BufferEncoding =
207
210
  | 'ascii'
@@ -49,7 +49,19 @@ declare module 'node:test' {
49
49
  function test(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
50
50
  function test(options?: TestOptions, fn?: TestFn): Promise<void>;
51
51
  function test(fn?: TestFn): Promise<void>;
52
-
52
+ namespace test {
53
+ export {
54
+ after,
55
+ afterEach,
56
+ before,
57
+ beforeEach,
58
+ describe,
59
+ it,
60
+ run,
61
+ mock,
62
+ test
63
+ };
64
+ }
53
65
  /**
54
66
  * @since v18.6.0
55
67
  * @param name The name of the suite, which is displayed when reporting suite results.
@@ -73,6 +85,15 @@ declare module 'node:test' {
73
85
  function todo(name?: string, fn?: SuiteFn): void;
74
86
  function todo(options?: TestOptions, fn?: SuiteFn): void;
75
87
  function todo(fn?: SuiteFn): void;
88
+
89
+ /**
90
+ * Shorthand for marking a suite as `only`, same as `describe([name], { only: true }[, fn])`.
91
+ * @since v18.15.0
92
+ */
93
+ function only(name?: string, options?: TestOptions, fn?: SuiteFn): void;
94
+ function only(name?: string, fn?: SuiteFn): void;
95
+ function only(options?: TestOptions, fn?: SuiteFn): void;
96
+ function only(fn?: SuiteFn): void;
76
97
  }
77
98
 
78
99
  /**
@@ -99,6 +120,15 @@ declare module 'node:test' {
99
120
  function todo(name?: string, fn?: TestFn): void;
100
121
  function todo(options?: TestOptions, fn?: TestFn): void;
101
122
  function todo(fn?: TestFn): void;
123
+
124
+ /**
125
+ * Shorthand for marking a test as `only`, same as `it([name], { only: true }[, fn])`.
126
+ * @since v18.15.0
127
+ */
128
+ function only(name?: string, options?: TestOptions, fn?: TestFn): void;
129
+ function only(name?: string, fn?: TestFn): void;
130
+ function only(options?: TestOptions, fn?: TestFn): void;
131
+ function only(fn?: TestFn): void;
102
132
  }
103
133
 
104
134
  /**