@types/node 20.1.6 → 20.2.0

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 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: Tue, 16 May 2023 19:02:56 GMT
11
+ * Last updated: Wed, 17 May 2023 23:32:57 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
14
14
 
node/buffer.d.ts CHANGED
@@ -2309,7 +2309,7 @@ declare module 'buffer' {
2309
2309
  * **For code running using Node.js APIs, converting between base64-encoded strings**
2310
2310
  * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
2311
2311
  * @since v15.13.0, v14.17.0
2312
- * @deprecated Use `Buffer.from(data, 'base64')` instead.
2312
+ * @legacy Use `Buffer.from(data, 'base64')` instead.
2313
2313
  * @param data The Base64-encoded input string.
2314
2314
  */
2315
2315
  function atob(data: string): string;
@@ -2325,7 +2325,7 @@ declare module 'buffer' {
2325
2325
  * **For code running using Node.js APIs, converting between base64-encoded strings**
2326
2326
  * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
2327
2327
  * @since v15.13.0, v14.17.0
2328
- * @deprecated Use `buf.toString('base64')` instead.
2328
+ * @legacy Use `buf.toString('base64')` instead.
2329
2329
  * @param data An ASCII (Latin1) string.
2330
2330
  */
2331
2331
  function btoa(data: string): string;
node/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for non-npm package Node.js 20.1
1
+ // Type definitions for non-npm package Node.js 20.2
2
2
  // Project: https://nodejs.org/
3
3
  // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4
4
  // DefinitelyTyped <https://github.com/DefinitelyTyped>
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "20.1.6",
3
+ "version": "20.2.0",
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": "509a0204e10c890c40b8b7fd4701c49bd03eff7896ae661270ae2601e846460b",
235
+ "typesPublisherContentHash": "de42ebcc68df0da911bfa6137aff9ec2506168d7f7d2cafc27994b22bbc119f7",
236
236
  "typeScriptVersion": "4.3"
237
237
  }
node/test.d.ts CHANGED
@@ -135,6 +135,29 @@ declare module 'node:test' {
135
135
  function test(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
136
136
  function test(options?: TestOptions, fn?: TestFn): Promise<void>;
137
137
  function test(fn?: TestFn): Promise<void>;
138
+ namespace test {
139
+ /**
140
+ * Shorthand for skipping a suite, same as `test([name], { skip: true }[, fn])`.
141
+ */
142
+ function skip(name?: string, options?: TestOptions, fn?: TestFn): void;
143
+ function skip(name?: string, fn?: TestFn): void;
144
+ function skip(options?: TestOptions, fn?: TestFn): void;
145
+ function skip(fn?: TestFn): void;
146
+ /**
147
+ * Shorthand for marking a suite as `TODO`, same as `test([name], { todo: true }[, fn])`.
148
+ */
149
+ function todo(name?: string, options?: TestOptions, fn?: TestFn): void;
150
+ function todo(name?: string, fn?: TestFn): void;
151
+ function todo(options?: TestOptions, fn?: TestFn): void;
152
+ function todo(fn?: TestFn): void;
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;
160
+ }
138
161
  /**
139
162
  * The `describe()` function imported from the `node:test` module. Each
140
163
  * invocation of this function results in the creation of a Subtest.
@@ -164,6 +187,13 @@ declare module 'node:test' {
164
187
  function todo(name?: string, fn?: SuiteFn): void;
165
188
  function todo(options?: TestOptions, fn?: SuiteFn): void;
166
189
  function todo(fn?: SuiteFn): void;
190
+ /**
191
+ * Shorthand for marking a suite as `TODO`, same as `describe([name], { only: true }[, fn])`.
192
+ */
193
+ function only(name?: string, options?: TestOptions, fn?: SuiteFn): void;
194
+ function only(name?: string, fn?: SuiteFn): void;
195
+ function only(options?: TestOptions, fn?: SuiteFn): void;
196
+ function only(fn?: SuiteFn): void;
167
197
  }
168
198
  /**
169
199
  * Shorthand for `test()`.
@@ -186,6 +216,13 @@ declare module 'node:test' {
186
216
  function todo(name?: string, fn?: TestFn): void;
187
217
  function todo(options?: TestOptions, fn?: TestFn): void;
188
218
  function todo(fn?: TestFn): void;
219
+ /**
220
+ * Shorthand for marking a suite as `TODO`, same as `it([name], { only: true }[, fn])`.
221
+ */
222
+ function only(name?: string, options?: TestOptions, fn?: TestFn): void;
223
+ function only(name?: string, fn?: TestFn): void;
224
+ function only(options?: TestOptions, fn?: TestFn): void;
225
+ function only(fn?: TestFn): void;
189
226
  }
190
227
  /**
191
228
  * The type of a function under test. The first argument to this function is a
node/ts4.8/buffer.d.ts CHANGED
@@ -2309,7 +2309,7 @@ declare module 'buffer' {
2309
2309
  * **For code running using Node.js APIs, converting between base64-encoded strings**
2310
2310
  * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
2311
2311
  * @since v15.13.0, v14.17.0
2312
- * @deprecated Use `Buffer.from(data, 'base64')` instead.
2312
+ * @legacy Use `Buffer.from(data, 'base64')` instead.
2313
2313
  * @param data The Base64-encoded input string.
2314
2314
  */
2315
2315
  function atob(data: string): string;
@@ -2325,7 +2325,7 @@ declare module 'buffer' {
2325
2325
  * **For code running using Node.js APIs, converting between base64-encoded strings**
2326
2326
  * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
2327
2327
  * @since v15.13.0, v14.17.0
2328
- * @deprecated Use `buf.toString('base64')` instead.
2328
+ * @legacy Use `buf.toString('base64')` instead.
2329
2329
  * @param data An ASCII (Latin1) string.
2330
2330
  */
2331
2331
  function btoa(data: string): string;
node/ts4.8/test.d.ts CHANGED
@@ -135,6 +135,29 @@ declare module 'node:test' {
135
135
  function test(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
136
136
  function test(options?: TestOptions, fn?: TestFn): Promise<void>;
137
137
  function test(fn?: TestFn): Promise<void>;
138
+ namespace test {
139
+ /**
140
+ * Shorthand for skipping a suite, same as `test([name], { skip: true }[, fn])`.
141
+ */
142
+ function skip(name?: string, options?: TestOptions, fn?: TestFn): void;
143
+ function skip(name?: string, fn?: TestFn): void;
144
+ function skip(options?: TestOptions, fn?: TestFn): void;
145
+ function skip(fn?: TestFn): void;
146
+ /**
147
+ * Shorthand for marking a suite as `TODO`, same as `test([name], { todo: true }[, fn])`.
148
+ */
149
+ function todo(name?: string, options?: TestOptions, fn?: TestFn): void;
150
+ function todo(name?: string, fn?: TestFn): void;
151
+ function todo(options?: TestOptions, fn?: TestFn): void;
152
+ function todo(fn?: TestFn): void;
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;
160
+ }
138
161
  /**
139
162
  * The `describe()` function imported from the `node:test` module. Each
140
163
  * invocation of this function results in the creation of a Subtest.
@@ -164,6 +187,13 @@ declare module 'node:test' {
164
187
  function todo(name?: string, fn?: SuiteFn): void;
165
188
  function todo(options?: TestOptions, fn?: SuiteFn): void;
166
189
  function todo(fn?: SuiteFn): void;
190
+ /**
191
+ * Shorthand for marking a suite as `TODO`, same as `describe([name], { only: true }[, fn])`.
192
+ */
193
+ function only(name?: string, options?: TestOptions, fn?: SuiteFn): void;
194
+ function only(name?: string, fn?: SuiteFn): void;
195
+ function only(options?: TestOptions, fn?: SuiteFn): void;
196
+ function only(fn?: SuiteFn): void;
167
197
  }
168
198
  /**
169
199
  * Shorthand for `test()`.
@@ -186,6 +216,13 @@ declare module 'node:test' {
186
216
  function todo(name?: string, fn?: ItFn): void;
187
217
  function todo(options?: TestOptions, fn?: ItFn): void;
188
218
  function todo(fn?: ItFn): void;
219
+ /**
220
+ * Shorthand for marking a suite as `TODO`, same as `it([name], { only: true }[, fn])`.
221
+ */
222
+ function only(name?: string, options?: TestOptions, fn?: ItFn): void;
223
+ function only(name?: string, fn?: ItFn): void;
224
+ function only(options?: TestOptions, fn?: ItFn): void;
225
+ function only(fn?: ItFn): void;
189
226
  }
190
227
  /**
191
228
  * The type of a function under test. The first argument to this function is a
node/ts4.8/url.d.ts CHANGED
@@ -129,7 +129,7 @@ declare module 'url' {
129
129
  * string, an `Error` is thrown.
130
130
  * * `result` is returned.
131
131
  * @since v0.1.25
132
- * @deprecated Legacy: Use the WHATWG URL API instead.
132
+ * @legacy Use the WHATWG URL API instead.
133
133
  * @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()`.
134
134
  */
135
135
  function format(urlObject: URL, options?: URLFormatOptions): string;
@@ -193,7 +193,7 @@ declare module 'url' {
193
193
  * string, an `Error` is thrown.
194
194
  * * `result` is returned.
195
195
  * @since v0.1.25
196
- * @deprecated Legacy: Use the WHATWG URL API instead.
196
+ * @legacy Use the WHATWG URL API instead.
197
197
  * @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()`.
198
198
  */
199
199
  function format(urlObject: UrlObject | string): string;
@@ -226,7 +226,7 @@ declare module 'url' {
226
226
  * resolve('http://example.com/one', '/two'); // 'http://example.com/two'
227
227
  * ```
228
228
  * @since v0.1.25
229
- * @deprecated Legacy: Use the WHATWG URL API instead.
229
+ * @legacy Use the WHATWG URL API instead.
230
230
  * @param from The base URL to use if `to` is a relative URL.
231
231
  * @param to The target URL to resolve.
232
232
  */
node/ts4.8/util.d.ts CHANGED
@@ -575,7 +575,7 @@ declare module 'util' {
575
575
  * stream.write('With ES6');
576
576
  * ```
577
577
  * @since v0.3.0
578
- * @deprecated Legacy: Use ES2015 class syntax and `extends` keyword instead.
578
+ * @legacy Use ES2015 class syntax and `extends` keyword instead.
579
579
  */
580
580
  export function inherits(constructor: unknown, superConstructor: unknown): void;
581
581
  export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void;
node/url.d.ts CHANGED
@@ -129,7 +129,7 @@ declare module 'url' {
129
129
  * string, an `Error` is thrown.
130
130
  * * `result` is returned.
131
131
  * @since v0.1.25
132
- * @deprecated Legacy: Use the WHATWG URL API instead.
132
+ * @legacy Use the WHATWG URL API instead.
133
133
  * @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()`.
134
134
  */
135
135
  function format(urlObject: URL, options?: URLFormatOptions): string;
@@ -193,7 +193,7 @@ declare module 'url' {
193
193
  * string, an `Error` is thrown.
194
194
  * * `result` is returned.
195
195
  * @since v0.1.25
196
- * @deprecated Legacy: Use the WHATWG URL API instead.
196
+ * @legacy Use the WHATWG URL API instead.
197
197
  * @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()`.
198
198
  */
199
199
  function format(urlObject: UrlObject | string): string;
@@ -226,7 +226,7 @@ declare module 'url' {
226
226
  * resolve('http://example.com/one', '/two'); // 'http://example.com/two'
227
227
  * ```
228
228
  * @since v0.1.25
229
- * @deprecated Legacy: Use the WHATWG URL API instead.
229
+ * @legacy Use the WHATWG URL API instead.
230
230
  * @param from The base URL to use if `to` is a relative URL.
231
231
  * @param to The target URL to resolve.
232
232
  */
node/util.d.ts CHANGED
@@ -575,7 +575,7 @@ declare module 'util' {
575
575
  * stream.write('With ES6');
576
576
  * ```
577
577
  * @since v0.3.0
578
- * @deprecated Legacy: Use ES2015 class syntax and `extends` keyword instead.
578
+ * @legacy Use ES2015 class syntax and `extends` keyword instead.
579
579
  */
580
580
  export function inherits(constructor: unknown, superConstructor: unknown): void;
581
581
  export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void;