@types/node 18.16.11 → 18.16.13

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 19:02:58 GMT
11
+ * Last updated: Thu, 18 May 2023 13:32:53 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
@@ -2280,7 +2280,7 @@ declare module 'buffer' {
2280
2280
  * **For code running using Node.js APIs, converting between base64-encoded strings**
2281
2281
  * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
2282
2282
  * @since v15.13.0, v14.17.0
2283
- * @deprecated Use `Buffer.from(data, 'base64')` instead.
2283
+ * @legacy Use `Buffer.from(data, 'base64')` instead.
2284
2284
  * @param data The Base64-encoded input string.
2285
2285
  */
2286
2286
  function atob(data: string): string;
@@ -2296,7 +2296,7 @@ declare module 'buffer' {
2296
2296
  * **For code running using Node.js APIs, converting between base64-encoded strings**
2297
2297
  * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
2298
2298
  * @since v15.13.0, v14.17.0
2299
- * @deprecated Use `buf.toString('base64')` instead.
2299
+ * @legacy Use `buf.toString('base64')` instead.
2300
2300
  * @param data An ASCII (Latin1) string.
2301
2301
  */
2302
2302
  function btoa(data: string): string;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "18.16.11",
3
+ "version": "18.16.13",
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": "b0e00953c949cc2b26638ad9dbebd702ba52c9262b52efcb0b47da2f640ed13c",
235
+ "typesPublisherContentHash": "8595b21cc6f908c566e0da0164012a96ed2937cdb4a2f5d395e0874a03ec819d",
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
  /**
@@ -2280,7 +2280,7 @@ declare module 'buffer' {
2280
2280
  * **For code running using Node.js APIs, converting between base64-encoded strings**
2281
2281
  * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
2282
2282
  * @since v15.13.0, v14.17.0
2283
- * @deprecated Use `Buffer.from(data, 'base64')` instead.
2283
+ * @legacy Use `Buffer.from(data, 'base64')` instead.
2284
2284
  * @param data The Base64-encoded input string.
2285
2285
  */
2286
2286
  function atob(data: string): string;
@@ -2296,7 +2296,7 @@ declare module 'buffer' {
2296
2296
  * **For code running using Node.js APIs, converting between base64-encoded strings**
2297
2297
  * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
2298
2298
  * @since v15.13.0, v14.17.0
2299
- * @deprecated Use `buf.toString('base64')` instead.
2299
+ * @legacy Use `buf.toString('base64')` instead.
2300
2300
  * @param data An ASCII (Latin1) string.
2301
2301
  */
2302
2302
  function btoa(data: string): string;
@@ -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
  /**
@@ -135,7 +135,7 @@ declare module 'url' {
135
135
  * string, an `Error` is thrown.
136
136
  * * `result` is returned.
137
137
  * @since v0.1.25
138
- * @deprecated Legacy: Use the WHATWG URL API instead.
138
+ * @legacy Use the WHATWG URL API instead.
139
139
  * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
140
140
  */
141
141
  function format(urlObject: URL, options?: URLFormatOptions): string;
@@ -199,7 +199,7 @@ declare module 'url' {
199
199
  * string, an `Error` is thrown.
200
200
  * * `result` is returned.
201
201
  * @since v0.1.25
202
- * @deprecated Legacy: Use the WHATWG URL API instead.
202
+ * @legacy Use the WHATWG URL API instead.
203
203
  * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
204
204
  */
205
205
  function format(urlObject: UrlObject | string): string;
@@ -232,7 +232,7 @@ declare module 'url' {
232
232
  * resolve('http://example.com/one', '/two'); // 'http://example.com/two'
233
233
  * ```
234
234
  * @since v0.1.25
235
- * @deprecated Legacy: Use the WHATWG URL API instead.
235
+ * @legacy Use the WHATWG URL API instead.
236
236
  * @param from The base URL to use if `to` is a relative URL.
237
237
  * @param to The target URL to resolve.
238
238
  */
@@ -556,7 +556,7 @@ declare module 'util' {
556
556
  * stream.write('With ES6');
557
557
  * ```
558
558
  * @since v0.3.0
559
- * @deprecated Legacy: Use ES2015 class syntax and `extends` keyword instead.
559
+ * @legacy Use ES2015 class syntax and `extends` keyword instead.
560
560
  */
561
561
  export function inherits(constructor: unknown, superConstructor: unknown): void;
562
562
  export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void;
node v18.16/url.d.ts CHANGED
@@ -135,7 +135,7 @@ declare module 'url' {
135
135
  * string, an `Error` is thrown.
136
136
  * * `result` is returned.
137
137
  * @since v0.1.25
138
- * @deprecated Legacy: Use the WHATWG URL API instead.
138
+ * @legacy Use the WHATWG URL API instead.
139
139
  * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
140
140
  */
141
141
  function format(urlObject: URL, options?: URLFormatOptions): string;
@@ -199,7 +199,7 @@ declare module 'url' {
199
199
  * string, an `Error` is thrown.
200
200
  * * `result` is returned.
201
201
  * @since v0.1.25
202
- * @deprecated Legacy: Use the WHATWG URL API instead.
202
+ * @legacy Use the WHATWG URL API instead.
203
203
  * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
204
204
  */
205
205
  function format(urlObject: UrlObject | string): string;
@@ -232,7 +232,7 @@ declare module 'url' {
232
232
  * resolve('http://example.com/one', '/two'); // 'http://example.com/two'
233
233
  * ```
234
234
  * @since v0.1.25
235
- * @deprecated Legacy: Use the WHATWG URL API instead.
235
+ * @legacy Use the WHATWG URL API instead.
236
236
  * @param from The base URL to use if `to` is a relative URL.
237
237
  * @param to The target URL to resolve.
238
238
  */
node v18.16/util.d.ts CHANGED
@@ -556,7 +556,7 @@ declare module 'util' {
556
556
  * stream.write('With ES6');
557
557
  * ```
558
558
  * @since v0.3.0
559
- * @deprecated Legacy: Use ES2015 class syntax and `extends` keyword instead.
559
+ * @legacy Use ES2015 class syntax and `extends` keyword instead.
560
560
  */
561
561
  export function inherits(constructor: unknown, superConstructor: unknown): void;
562
562
  export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void;