@types/node 22.17.0 → 22.17.2
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 v22.17/README.md +1 -1
- node v22.17/child_process.d.ts +25 -121
- node v22.17/package.json +3 -3
- node v22.17/stream/web.d.ts +4 -0
node v22.17/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/v22.
|
9
9
|
|
10
10
|
### Additional Details
|
11
|
-
* Last updated:
|
11
|
+
* Last updated: Fri, 15 Aug 2025 08:39:32 GMT
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
13
13
|
|
14
14
|
# Credits
|
node v22.17/child_process.d.ts
CHANGED
@@ -66,7 +66,6 @@
|
|
66
66
|
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/child_process.js)
|
67
67
|
*/
|
68
68
|
declare module "child_process" {
|
69
|
-
import { ObjectEncodingOptions } from "node:fs";
|
70
69
|
import { Abortable, EventEmitter } from "node:events";
|
71
70
|
import * as dgram from "node:dgram";
|
72
71
|
import * as net from "node:net";
|
@@ -887,12 +886,13 @@ declare module "child_process" {
|
|
887
886
|
signal?: AbortSignal | undefined;
|
888
887
|
maxBuffer?: number | undefined;
|
889
888
|
killSignal?: NodeJS.Signals | number | undefined;
|
889
|
+
encoding?: string | null | undefined;
|
890
890
|
}
|
891
891
|
interface ExecOptionsWithStringEncoding extends ExecOptions {
|
892
|
-
encoding
|
892
|
+
encoding?: BufferEncoding | undefined;
|
893
893
|
}
|
894
894
|
interface ExecOptionsWithBufferEncoding extends ExecOptions {
|
895
|
-
encoding:
|
895
|
+
encoding: "buffer" | null; // specify `null`.
|
896
896
|
}
|
897
897
|
interface ExecException extends Error {
|
898
898
|
cmd?: string | undefined;
|
@@ -995,38 +995,19 @@ declare module "child_process" {
|
|
995
995
|
// `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
|
996
996
|
function exec(
|
997
997
|
command: string,
|
998
|
-
options:
|
999
|
-
encoding: "buffer" | null;
|
1000
|
-
} & ExecOptions,
|
998
|
+
options: ExecOptionsWithBufferEncoding,
|
1001
999
|
callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void,
|
1002
1000
|
): ChildProcess;
|
1003
|
-
// `options` with well
|
1004
|
-
function exec(
|
1005
|
-
command: string,
|
1006
|
-
options: {
|
1007
|
-
encoding: BufferEncoding;
|
1008
|
-
} & ExecOptions,
|
1009
|
-
callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
|
1010
|
-
): ChildProcess;
|
1011
|
-
// `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
|
1012
|
-
// There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
|
1013
|
-
function exec(
|
1014
|
-
command: string,
|
1015
|
-
options: {
|
1016
|
-
encoding: BufferEncoding;
|
1017
|
-
} & ExecOptions,
|
1018
|
-
callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
|
1019
|
-
): ChildProcess;
|
1020
|
-
// `options` without an `encoding` means stdout/stderr are definitely `string`.
|
1001
|
+
// `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`.
|
1021
1002
|
function exec(
|
1022
1003
|
command: string,
|
1023
|
-
options:
|
1004
|
+
options: ExecOptionsWithStringEncoding,
|
1024
1005
|
callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
|
1025
1006
|
): ChildProcess;
|
1026
1007
|
// fallback if nothing else matches. Worst case is always `string | Buffer`.
|
1027
1008
|
function exec(
|
1028
1009
|
command: string,
|
1029
|
-
options:
|
1010
|
+
options: ExecOptions | undefined | null,
|
1030
1011
|
callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
|
1031
1012
|
): ChildProcess;
|
1032
1013
|
interface PromiseWithChild<T> extends Promise<T> {
|
@@ -1039,32 +1020,21 @@ declare module "child_process" {
|
|
1039
1020
|
}>;
|
1040
1021
|
function __promisify__(
|
1041
1022
|
command: string,
|
1042
|
-
options:
|
1043
|
-
encoding: "buffer" | null;
|
1044
|
-
} & ExecOptions,
|
1023
|
+
options: ExecOptionsWithBufferEncoding,
|
1045
1024
|
): PromiseWithChild<{
|
1046
1025
|
stdout: Buffer;
|
1047
1026
|
stderr: Buffer;
|
1048
1027
|
}>;
|
1049
1028
|
function __promisify__(
|
1050
1029
|
command: string,
|
1051
|
-
options:
|
1052
|
-
encoding: BufferEncoding;
|
1053
|
-
} & ExecOptions,
|
1030
|
+
options: ExecOptionsWithStringEncoding,
|
1054
1031
|
): PromiseWithChild<{
|
1055
1032
|
stdout: string;
|
1056
1033
|
stderr: string;
|
1057
1034
|
}>;
|
1058
1035
|
function __promisify__(
|
1059
1036
|
command: string,
|
1060
|
-
options: ExecOptions,
|
1061
|
-
): PromiseWithChild<{
|
1062
|
-
stdout: string;
|
1063
|
-
stderr: string;
|
1064
|
-
}>;
|
1065
|
-
function __promisify__(
|
1066
|
-
command: string,
|
1067
|
-
options?: (ObjectEncodingOptions & ExecOptions) | null,
|
1037
|
+
options: ExecOptions | undefined | null,
|
1068
1038
|
): PromiseWithChild<{
|
1069
1039
|
stdout: string | Buffer;
|
1070
1040
|
stderr: string | Buffer;
|
@@ -1076,16 +1046,16 @@ declare module "child_process" {
|
|
1076
1046
|
windowsVerbatimArguments?: boolean | undefined;
|
1077
1047
|
shell?: boolean | string | undefined;
|
1078
1048
|
signal?: AbortSignal | undefined;
|
1049
|
+
encoding?: string | null | undefined;
|
1079
1050
|
}
|
1080
1051
|
interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
|
1081
|
-
encoding
|
1052
|
+
encoding?: BufferEncoding | undefined;
|
1082
1053
|
}
|
1083
1054
|
interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
|
1084
1055
|
encoding: "buffer" | null;
|
1085
1056
|
}
|
1086
|
-
|
1087
|
-
|
1088
|
-
}
|
1057
|
+
/** @deprecated Use `ExecFileOptions` instead. */
|
1058
|
+
interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {}
|
1089
1059
|
type ExecFileException =
|
1090
1060
|
& Omit<ExecException, "code">
|
1091
1061
|
& Omit<NodeJS.ErrnoException, "code">
|
@@ -1154,80 +1124,44 @@ declare module "child_process" {
|
|
1154
1124
|
* @param args List of string arguments.
|
1155
1125
|
* @param callback Called with the output when process terminates.
|
1156
1126
|
*/
|
1157
|
-
function execFile(file: string): ChildProcess;
|
1158
|
-
function execFile(
|
1159
|
-
file: string,
|
1160
|
-
options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
|
1161
|
-
): ChildProcess;
|
1162
|
-
function execFile(file: string, args?: readonly string[] | null): ChildProcess;
|
1163
|
-
function execFile(
|
1164
|
-
file: string,
|
1165
|
-
args: readonly string[] | undefined | null,
|
1166
|
-
options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
|
1167
|
-
): ChildProcess;
|
1168
1127
|
// no `options` definitely means stdout/stderr are `string`.
|
1169
1128
|
function execFile(
|
1170
1129
|
file: string,
|
1171
|
-
callback
|
1130
|
+
callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
|
1172
1131
|
): ChildProcess;
|
1173
1132
|
function execFile(
|
1174
1133
|
file: string,
|
1175
1134
|
args: readonly string[] | undefined | null,
|
1176
|
-
callback
|
1135
|
+
callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
|
1177
1136
|
): ChildProcess;
|
1178
1137
|
// `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
|
1179
1138
|
function execFile(
|
1180
1139
|
file: string,
|
1181
1140
|
options: ExecFileOptionsWithBufferEncoding,
|
1182
|
-
callback
|
1141
|
+
callback?: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void,
|
1183
1142
|
): ChildProcess;
|
1184
1143
|
function execFile(
|
1185
1144
|
file: string,
|
1186
1145
|
args: readonly string[] | undefined | null,
|
1187
1146
|
options: ExecFileOptionsWithBufferEncoding,
|
1188
|
-
callback
|
1147
|
+
callback?: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void,
|
1189
1148
|
): ChildProcess;
|
1190
|
-
// `options` with well
|
1149
|
+
// `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`.
|
1191
1150
|
function execFile(
|
1192
1151
|
file: string,
|
1193
1152
|
options: ExecFileOptionsWithStringEncoding,
|
1194
|
-
callback
|
1153
|
+
callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
|
1195
1154
|
): ChildProcess;
|
1196
1155
|
function execFile(
|
1197
1156
|
file: string,
|
1198
1157
|
args: readonly string[] | undefined | null,
|
1199
1158
|
options: ExecFileOptionsWithStringEncoding,
|
1200
|
-
callback
|
1201
|
-
): ChildProcess;
|
1202
|
-
// `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
|
1203
|
-
// There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
|
1204
|
-
function execFile(
|
1205
|
-
file: string,
|
1206
|
-
options: ExecFileOptionsWithOtherEncoding,
|
1207
|
-
callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
|
1208
|
-
): ChildProcess;
|
1209
|
-
function execFile(
|
1210
|
-
file: string,
|
1211
|
-
args: readonly string[] | undefined | null,
|
1212
|
-
options: ExecFileOptionsWithOtherEncoding,
|
1213
|
-
callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
|
1214
|
-
): ChildProcess;
|
1215
|
-
// `options` without an `encoding` means stdout/stderr are definitely `string`.
|
1216
|
-
function execFile(
|
1217
|
-
file: string,
|
1218
|
-
options: ExecFileOptions,
|
1219
|
-
callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
|
1220
|
-
): ChildProcess;
|
1221
|
-
function execFile(
|
1222
|
-
file: string,
|
1223
|
-
args: readonly string[] | undefined | null,
|
1224
|
-
options: ExecFileOptions,
|
1225
|
-
callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
|
1159
|
+
callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
|
1226
1160
|
): ChildProcess;
|
1227
1161
|
// fallback if nothing else matches. Worst case is always `string | Buffer`.
|
1228
1162
|
function execFile(
|
1229
1163
|
file: string,
|
1230
|
-
options:
|
1164
|
+
options: ExecFileOptions | undefined | null,
|
1231
1165
|
callback:
|
1232
1166
|
| ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void)
|
1233
1167
|
| undefined
|
@@ -1236,7 +1170,7 @@ declare module "child_process" {
|
|
1236
1170
|
function execFile(
|
1237
1171
|
file: string,
|
1238
1172
|
args: readonly string[] | undefined | null,
|
1239
|
-
options:
|
1173
|
+
options: ExecFileOptions | undefined | null,
|
1240
1174
|
callback:
|
1241
1175
|
| ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void)
|
1242
1176
|
| undefined
|
@@ -1286,37 +1220,7 @@ declare module "child_process" {
|
|
1286
1220
|
}>;
|
1287
1221
|
function __promisify__(
|
1288
1222
|
file: string,
|
1289
|
-
options:
|
1290
|
-
): PromiseWithChild<{
|
1291
|
-
stdout: string | Buffer;
|
1292
|
-
stderr: string | Buffer;
|
1293
|
-
}>;
|
1294
|
-
function __promisify__(
|
1295
|
-
file: string,
|
1296
|
-
args: readonly string[] | undefined | null,
|
1297
|
-
options: ExecFileOptionsWithOtherEncoding,
|
1298
|
-
): PromiseWithChild<{
|
1299
|
-
stdout: string | Buffer;
|
1300
|
-
stderr: string | Buffer;
|
1301
|
-
}>;
|
1302
|
-
function __promisify__(
|
1303
|
-
file: string,
|
1304
|
-
options: ExecFileOptions,
|
1305
|
-
): PromiseWithChild<{
|
1306
|
-
stdout: string;
|
1307
|
-
stderr: string;
|
1308
|
-
}>;
|
1309
|
-
function __promisify__(
|
1310
|
-
file: string,
|
1311
|
-
args: readonly string[] | undefined | null,
|
1312
|
-
options: ExecFileOptions,
|
1313
|
-
): PromiseWithChild<{
|
1314
|
-
stdout: string;
|
1315
|
-
stderr: string;
|
1316
|
-
}>;
|
1317
|
-
function __promisify__(
|
1318
|
-
file: string,
|
1319
|
-
options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
|
1223
|
+
options: ExecFileOptions | undefined | null,
|
1320
1224
|
): PromiseWithChild<{
|
1321
1225
|
stdout: string | Buffer;
|
1322
1226
|
stderr: string | Buffer;
|
@@ -1324,7 +1228,7 @@ declare module "child_process" {
|
|
1324
1228
|
function __promisify__(
|
1325
1229
|
file: string,
|
1326
1230
|
args: readonly string[] | undefined | null,
|
1327
|
-
options:
|
1231
|
+
options: ExecFileOptions | undefined | null,
|
1328
1232
|
): PromiseWithChild<{
|
1329
1233
|
stdout: string | Buffer;
|
1330
1234
|
stderr: string | Buffer;
|
node v22.17/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/node",
|
3
|
-
"version": "22.17.
|
3
|
+
"version": "22.17.2",
|
4
4
|
"description": "TypeScript definitions for node",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
6
6
|
"license": "MIT",
|
@@ -140,6 +140,6 @@
|
|
140
140
|
"undici-types": "~6.21.0"
|
141
141
|
},
|
142
142
|
"peerDependencies": {},
|
143
|
-
"typesPublisherContentHash": "
|
144
|
-
"typeScriptVersion": "5.
|
143
|
+
"typesPublisherContentHash": "a7ff7b5fd49b1c228d93a18f6beef30240317965773e258dde1569f20f24658d",
|
144
|
+
"typeScriptVersion": "5.2"
|
145
145
|
}
|
node v22.17/stream/web.d.ts
CHANGED
@@ -6,6 +6,8 @@ type _CountQueuingStrategy = typeof globalThis extends { onmessage: any } ? {}
|
|
6
6
|
: import("stream/web").CountQueuingStrategy;
|
7
7
|
type _DecompressionStream = typeof globalThis extends { onmessage: any; ReportingObserver: any } ? {}
|
8
8
|
: import("stream/web").DecompressionStream;
|
9
|
+
type _QueuingStrategy<T = any> = typeof globalThis extends { onmessage: any } ? {}
|
10
|
+
: import("stream/web").QueuingStrategy<T>;
|
9
11
|
type _ReadableByteStreamController = typeof globalThis extends { onmessage: any } ? {}
|
10
12
|
: import("stream/web").ReadableByteStreamController;
|
11
13
|
type _ReadableStream<R = any> = typeof globalThis extends { onmessage: any } ? {}
|
@@ -487,6 +489,8 @@ declare module "stream/web" {
|
|
487
489
|
}
|
488
490
|
: typeof import("stream/web").DecompressionStream;
|
489
491
|
|
492
|
+
interface QueuingStrategy<T = any> extends _QueuingStrategy<T> {}
|
493
|
+
|
490
494
|
interface ReadableByteStreamController extends _ReadableByteStreamController {}
|
491
495
|
/**
|
492
496
|
* `ReadableByteStreamController` class is a global reference for `import { ReadableByteStreamController } from 'node:stream/web'`.
|