@types/node 20.19.22 → 20.19.23
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 v20.19/README.md +1 -1
- node v20.19/buffer.buffer.d.ts +9 -0
- node v20.19/buffer.d.ts +8 -4
- node v20.19/child_process.d.ts +50 -33
- node v20.19/crypto.d.ts +151 -131
- node v20.19/dgram.d.ts +9 -8
- node v20.19/fs/promises.d.ts +41 -19
- node v20.19/fs.d.ts +89 -76
- node v20.19/globals.typedarray.d.ts +17 -0
- node v20.19/http.d.ts +41 -22
- node v20.19/http2.d.ts +29 -22
- node v20.19/https.d.ts +82 -50
- node v20.19/net.d.ts +7 -6
- node v20.19/os.d.ts +3 -2
- node v20.19/package.json +2 -2
- node v20.19/process.d.ts +2 -1
- node v20.19/stream/consumers.d.ts +2 -2
- node v20.19/string_decoder.d.ts +2 -2
- node v20.19/tls.d.ts +88 -64
- node v20.19/ts5.6/buffer.buffer.d.ts +10 -2
- node v20.19/ts5.6/globals.typedarray.d.ts +15 -0
- node v20.19/url.d.ts +1 -1
- node v20.19/util.d.ts +1 -1
- node v20.19/v8.d.ts +4 -3
- node v20.19/vm.d.ts +4 -3
- node v20.19/zlib.d.ts +21 -20
node v20.19/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v20.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Tue, 21 Oct 2025 00:04:31 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
node v20.19/buffer.buffer.d.ts
CHANGED
|
@@ -450,7 +450,16 @@ declare module "buffer" {
|
|
|
450
450
|
*/
|
|
451
451
|
subarray(start?: number, end?: number): Buffer<TArrayBuffer>;
|
|
452
452
|
}
|
|
453
|
+
// TODO: remove globals in future version
|
|
454
|
+
/**
|
|
455
|
+
* @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
|
|
456
|
+
* TypeScript versions earlier than 5.7.
|
|
457
|
+
*/
|
|
453
458
|
type NonSharedBuffer = Buffer<ArrayBuffer>;
|
|
459
|
+
/**
|
|
460
|
+
* @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
|
|
461
|
+
* TypeScript versions earlier than 5.7.
|
|
462
|
+
*/
|
|
454
463
|
type AllowSharedBuffer = Buffer<ArrayBufferLike>;
|
|
455
464
|
}
|
|
456
465
|
/** @deprecated Use `Buffer.allocUnsafeSlow()` instead. */
|
node v20.19/buffer.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ declare module "buffer" {
|
|
|
59
59
|
* @since v19.4.0, v18.14.0
|
|
60
60
|
* @param input The input to validate.
|
|
61
61
|
*/
|
|
62
|
-
export function isUtf8(input:
|
|
62
|
+
export function isUtf8(input: ArrayBuffer | NodeJS.TypedArray): boolean;
|
|
63
63
|
/**
|
|
64
64
|
* This function returns `true` if `input` contains only valid ASCII-encoded data,
|
|
65
65
|
* including the case in which `input` is empty.
|
|
@@ -68,7 +68,7 @@ declare module "buffer" {
|
|
|
68
68
|
* @since v19.6.0, v18.15.0
|
|
69
69
|
* @param input The input to validate.
|
|
70
70
|
*/
|
|
71
|
-
export function isAscii(input:
|
|
71
|
+
export function isAscii(input: ArrayBuffer | NodeJS.TypedArray): boolean;
|
|
72
72
|
export let INSPECT_MAX_BYTES: number;
|
|
73
73
|
export const kMaxLength: number;
|
|
74
74
|
export const kStringMaxLength: number;
|
|
@@ -113,7 +113,11 @@ declare module "buffer" {
|
|
|
113
113
|
* @param fromEnc The current encoding.
|
|
114
114
|
* @param toEnc To target encoding.
|
|
115
115
|
*/
|
|
116
|
-
export function transcode(
|
|
116
|
+
export function transcode(
|
|
117
|
+
source: Uint8Array,
|
|
118
|
+
fromEnc: TranscodeEncoding,
|
|
119
|
+
toEnc: TranscodeEncoding,
|
|
120
|
+
): NonSharedBuffer;
|
|
117
121
|
/**
|
|
118
122
|
* Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using
|
|
119
123
|
* a prior call to `URL.createObjectURL()`.
|
|
@@ -332,7 +336,7 @@ declare module "buffer" {
|
|
|
332
336
|
* @return The number of bytes contained within `string`.
|
|
333
337
|
*/
|
|
334
338
|
byteLength(
|
|
335
|
-
string: string |
|
|
339
|
+
string: string | NodeJS.ArrayBufferView | ArrayBufferLike,
|
|
336
340
|
encoding?: BufferEncoding,
|
|
337
341
|
): number;
|
|
338
342
|
/**
|
node v20.19/child_process.d.ts
CHANGED
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/child_process.js)
|
|
67
67
|
*/
|
|
68
68
|
declare module "child_process" {
|
|
69
|
+
import { NonSharedBuffer } from "node:buffer";
|
|
69
70
|
import { Abortable, EventEmitter } from "node:events";
|
|
70
71
|
import * as dgram from "node:dgram";
|
|
71
72
|
import * as net from "node:net";
|
|
@@ -1001,7 +1002,7 @@ declare module "child_process" {
|
|
|
1001
1002
|
function exec(
|
|
1002
1003
|
command: string,
|
|
1003
1004
|
options: ExecOptionsWithBufferEncoding,
|
|
1004
|
-
callback?: (error: ExecException | null, stdout:
|
|
1005
|
+
callback?: (error: ExecException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void,
|
|
1005
1006
|
): ChildProcess;
|
|
1006
1007
|
// `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`.
|
|
1007
1008
|
function exec(
|
|
@@ -1013,7 +1014,11 @@ declare module "child_process" {
|
|
|
1013
1014
|
function exec(
|
|
1014
1015
|
command: string,
|
|
1015
1016
|
options: ExecOptions | undefined | null,
|
|
1016
|
-
callback?: (
|
|
1017
|
+
callback?: (
|
|
1018
|
+
error: ExecException | null,
|
|
1019
|
+
stdout: string | NonSharedBuffer,
|
|
1020
|
+
stderr: string | NonSharedBuffer,
|
|
1021
|
+
) => void,
|
|
1017
1022
|
): ChildProcess;
|
|
1018
1023
|
interface PromiseWithChild<T> extends Promise<T> {
|
|
1019
1024
|
child: ChildProcess;
|
|
@@ -1027,8 +1032,8 @@ declare module "child_process" {
|
|
|
1027
1032
|
command: string,
|
|
1028
1033
|
options: ExecOptionsWithBufferEncoding,
|
|
1029
1034
|
): PromiseWithChild<{
|
|
1030
|
-
stdout:
|
|
1031
|
-
stderr:
|
|
1035
|
+
stdout: NonSharedBuffer;
|
|
1036
|
+
stderr: NonSharedBuffer;
|
|
1032
1037
|
}>;
|
|
1033
1038
|
function __promisify__(
|
|
1034
1039
|
command: string,
|
|
@@ -1041,8 +1046,8 @@ declare module "child_process" {
|
|
|
1041
1046
|
command: string,
|
|
1042
1047
|
options: ExecOptions | undefined | null,
|
|
1043
1048
|
): PromiseWithChild<{
|
|
1044
|
-
stdout: string |
|
|
1045
|
-
stderr: string |
|
|
1049
|
+
stdout: string | NonSharedBuffer;
|
|
1050
|
+
stderr: string | NonSharedBuffer;
|
|
1046
1051
|
}>;
|
|
1047
1052
|
}
|
|
1048
1053
|
interface ExecFileOptions extends CommonOptions, Abortable {
|
|
@@ -1143,13 +1148,13 @@ declare module "child_process" {
|
|
|
1143
1148
|
function execFile(
|
|
1144
1149
|
file: string,
|
|
1145
1150
|
options: ExecFileOptionsWithBufferEncoding,
|
|
1146
|
-
callback?: (error: ExecFileException | null, stdout:
|
|
1151
|
+
callback?: (error: ExecFileException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void,
|
|
1147
1152
|
): ChildProcess;
|
|
1148
1153
|
function execFile(
|
|
1149
1154
|
file: string,
|
|
1150
1155
|
args: readonly string[] | undefined | null,
|
|
1151
1156
|
options: ExecFileOptionsWithBufferEncoding,
|
|
1152
|
-
callback?: (error: ExecFileException | null, stdout:
|
|
1157
|
+
callback?: (error: ExecFileException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void,
|
|
1153
1158
|
): ChildProcess;
|
|
1154
1159
|
// `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`.
|
|
1155
1160
|
function execFile(
|
|
@@ -1168,7 +1173,11 @@ declare module "child_process" {
|
|
|
1168
1173
|
file: string,
|
|
1169
1174
|
options: ExecFileOptions | undefined | null,
|
|
1170
1175
|
callback:
|
|
1171
|
-
| ((
|
|
1176
|
+
| ((
|
|
1177
|
+
error: ExecFileException | null,
|
|
1178
|
+
stdout: string | NonSharedBuffer,
|
|
1179
|
+
stderr: string | NonSharedBuffer,
|
|
1180
|
+
) => void)
|
|
1172
1181
|
| undefined
|
|
1173
1182
|
| null,
|
|
1174
1183
|
): ChildProcess;
|
|
@@ -1177,7 +1186,11 @@ declare module "child_process" {
|
|
|
1177
1186
|
args: readonly string[] | undefined | null,
|
|
1178
1187
|
options: ExecFileOptions | undefined | null,
|
|
1179
1188
|
callback:
|
|
1180
|
-
| ((
|
|
1189
|
+
| ((
|
|
1190
|
+
error: ExecFileException | null,
|
|
1191
|
+
stdout: string | NonSharedBuffer,
|
|
1192
|
+
stderr: string | NonSharedBuffer,
|
|
1193
|
+
) => void)
|
|
1181
1194
|
| undefined
|
|
1182
1195
|
| null,
|
|
1183
1196
|
): ChildProcess;
|
|
@@ -1197,16 +1210,16 @@ declare module "child_process" {
|
|
|
1197
1210
|
file: string,
|
|
1198
1211
|
options: ExecFileOptionsWithBufferEncoding,
|
|
1199
1212
|
): PromiseWithChild<{
|
|
1200
|
-
stdout:
|
|
1201
|
-
stderr:
|
|
1213
|
+
stdout: NonSharedBuffer;
|
|
1214
|
+
stderr: NonSharedBuffer;
|
|
1202
1215
|
}>;
|
|
1203
1216
|
function __promisify__(
|
|
1204
1217
|
file: string,
|
|
1205
1218
|
args: readonly string[] | undefined | null,
|
|
1206
1219
|
options: ExecFileOptionsWithBufferEncoding,
|
|
1207
1220
|
): PromiseWithChild<{
|
|
1208
|
-
stdout:
|
|
1209
|
-
stderr:
|
|
1221
|
+
stdout: NonSharedBuffer;
|
|
1222
|
+
stderr: NonSharedBuffer;
|
|
1210
1223
|
}>;
|
|
1211
1224
|
function __promisify__(
|
|
1212
1225
|
file: string,
|
|
@@ -1227,16 +1240,16 @@ declare module "child_process" {
|
|
|
1227
1240
|
file: string,
|
|
1228
1241
|
options: ExecFileOptions | undefined | null,
|
|
1229
1242
|
): PromiseWithChild<{
|
|
1230
|
-
stdout: string |
|
|
1231
|
-
stderr: string |
|
|
1243
|
+
stdout: string | NonSharedBuffer;
|
|
1244
|
+
stderr: string | NonSharedBuffer;
|
|
1232
1245
|
}>;
|
|
1233
1246
|
function __promisify__(
|
|
1234
1247
|
file: string,
|
|
1235
1248
|
args: readonly string[] | undefined | null,
|
|
1236
1249
|
options: ExecFileOptions | undefined | null,
|
|
1237
1250
|
): PromiseWithChild<{
|
|
1238
|
-
stdout: string |
|
|
1239
|
-
stderr: string |
|
|
1251
|
+
stdout: string | NonSharedBuffer;
|
|
1252
|
+
stderr: string | NonSharedBuffer;
|
|
1240
1253
|
}>;
|
|
1241
1254
|
}
|
|
1242
1255
|
interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable {
|
|
@@ -1342,11 +1355,11 @@ declare module "child_process" {
|
|
|
1342
1355
|
* @param command The command to run.
|
|
1343
1356
|
* @param args List of string arguments.
|
|
1344
1357
|
*/
|
|
1345
|
-
function spawnSync(command: string): SpawnSyncReturns<
|
|
1358
|
+
function spawnSync(command: string): SpawnSyncReturns<NonSharedBuffer>;
|
|
1346
1359
|
function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
|
|
1347
|
-
function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<
|
|
1348
|
-
function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<string |
|
|
1349
|
-
function spawnSync(command: string, args: readonly string[]): SpawnSyncReturns<
|
|
1360
|
+
function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<NonSharedBuffer>;
|
|
1361
|
+
function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<string | NonSharedBuffer>;
|
|
1362
|
+
function spawnSync(command: string, args: readonly string[]): SpawnSyncReturns<NonSharedBuffer>;
|
|
1350
1363
|
function spawnSync(
|
|
1351
1364
|
command: string,
|
|
1352
1365
|
args: readonly string[],
|
|
@@ -1356,12 +1369,12 @@ declare module "child_process" {
|
|
|
1356
1369
|
command: string,
|
|
1357
1370
|
args: readonly string[],
|
|
1358
1371
|
options: SpawnSyncOptionsWithBufferEncoding,
|
|
1359
|
-
): SpawnSyncReturns<
|
|
1372
|
+
): SpawnSyncReturns<NonSharedBuffer>;
|
|
1360
1373
|
function spawnSync(
|
|
1361
1374
|
command: string,
|
|
1362
1375
|
args?: readonly string[],
|
|
1363
1376
|
options?: SpawnSyncOptions,
|
|
1364
|
-
): SpawnSyncReturns<string |
|
|
1377
|
+
): SpawnSyncReturns<string | NonSharedBuffer>;
|
|
1365
1378
|
interface CommonExecOptions extends CommonOptions {
|
|
1366
1379
|
input?: string | NodeJS.ArrayBufferView | undefined;
|
|
1367
1380
|
/**
|
|
@@ -1403,10 +1416,10 @@ declare module "child_process" {
|
|
|
1403
1416
|
* @param command The command to run.
|
|
1404
1417
|
* @return The stdout from the command.
|
|
1405
1418
|
*/
|
|
1406
|
-
function execSync(command: string):
|
|
1419
|
+
function execSync(command: string): NonSharedBuffer;
|
|
1407
1420
|
function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string;
|
|
1408
|
-
function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding):
|
|
1409
|
-
function execSync(command: string, options?: ExecSyncOptions): string |
|
|
1421
|
+
function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): NonSharedBuffer;
|
|
1422
|
+
function execSync(command: string, options?: ExecSyncOptions): string | NonSharedBuffer;
|
|
1410
1423
|
interface ExecFileSyncOptions extends CommonExecOptions {
|
|
1411
1424
|
shell?: boolean | string | undefined;
|
|
1412
1425
|
}
|
|
@@ -1436,11 +1449,11 @@ declare module "child_process" {
|
|
|
1436
1449
|
* @param args List of string arguments.
|
|
1437
1450
|
* @return The stdout from the command.
|
|
1438
1451
|
*/
|
|
1439
|
-
function execFileSync(file: string):
|
|
1452
|
+
function execFileSync(file: string): NonSharedBuffer;
|
|
1440
1453
|
function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string;
|
|
1441
|
-
function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding):
|
|
1442
|
-
function execFileSync(file: string, options?: ExecFileSyncOptions): string |
|
|
1443
|
-
function execFileSync(file: string, args: readonly string[]):
|
|
1454
|
+
function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): NonSharedBuffer;
|
|
1455
|
+
function execFileSync(file: string, options?: ExecFileSyncOptions): string | NonSharedBuffer;
|
|
1456
|
+
function execFileSync(file: string, args: readonly string[]): NonSharedBuffer;
|
|
1444
1457
|
function execFileSync(
|
|
1445
1458
|
file: string,
|
|
1446
1459
|
args: readonly string[],
|
|
@@ -1450,8 +1463,12 @@ declare module "child_process" {
|
|
|
1450
1463
|
file: string,
|
|
1451
1464
|
args: readonly string[],
|
|
1452
1465
|
options: ExecFileSyncOptionsWithBufferEncoding,
|
|
1453
|
-
):
|
|
1454
|
-
function execFileSync(
|
|
1466
|
+
): NonSharedBuffer;
|
|
1467
|
+
function execFileSync(
|
|
1468
|
+
file: string,
|
|
1469
|
+
args?: readonly string[],
|
|
1470
|
+
options?: ExecFileSyncOptions,
|
|
1471
|
+
): string | NonSharedBuffer;
|
|
1455
1472
|
}
|
|
1456
1473
|
declare module "node:child_process" {
|
|
1457
1474
|
export * from "child_process";
|