@types/node 22.15.33 → 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 +15 -0
- {node v22.15 → node v22.17}/buffer.d.ts +5 -1
- {node v22.15 → node v22.17}/child_process.d.ts +25 -121
- {node v22.15 → node v22.17}/crypto.d.ts +17 -1
- {node v22.15 → node v22.17}/dns/promises.d.ts +11 -10
- {node v22.15 → node v22.17}/dns.d.ts +18 -19
- {node v22.15 → node v22.17}/events.d.ts +0 -1
- {node v22.15 → node v22.17}/fs/promises.d.ts +22 -11
- {node v22.15 → node v22.17}/fs.d.ts +41 -13
- {node v22.15 → node v22.17}/http.d.ts +63 -1
- {node v22.15 → node v22.17}/http2.d.ts +12 -1
- {node v22.15 → node v22.17}/inspector.d.ts +157 -4
- {node v22.15 → node v22.17}/module.d.ts +47 -14
- {node v22.15 → node v22.17}/package.json +3 -83
- {node v22.15 → node v22.17}/process.d.ts +0 -2
- {node v22.15 → node v22.17}/readline/promises.d.ts +0 -1
- {node v22.15 → node v22.17}/repl.d.ts +3 -5
- {node v22.15 → node v22.17}/sqlite.d.ts +172 -0
- {node v22.15 → node v22.17}/stream/web.d.ts +8 -0
- {node v22.15 → node v22.17}/stream.d.ts +0 -11
- node v22.17/test.d.ts +2183 -0
- {node v22.15 → node v22.17}/url.d.ts +1 -3
- {node v22.15 → node v22.17}/util.d.ts +19 -4
- {node v22.15 → node v22.17}/v8.d.ts +27 -30
- {node v22.15 → node v22.17}/worker_threads.d.ts +33 -17
- {node v22.15 → node v22.17}/zlib.d.ts +8 -2
- node v22.15/README.md +0 -15
- node v22.15/test.d.ts +0 -2278
- {node v22.15 → node v22.17}/LICENSE +0 -0
- {node v22.15 → node v22.17}/assert/strict.d.ts +0 -0
- {node v22.15 → node v22.17}/assert.d.ts +0 -0
- {node v22.15 → node v22.17}/async_hooks.d.ts +1 -1
- {node v22.15 → node v22.17}/buffer.buffer.d.ts +0 -0
- {node v22.15 → node v22.17}/cluster.d.ts +0 -0
- {node v22.15 → node v22.17}/compatibility/disposable.d.ts +0 -0
- {node v22.15 → node v22.17}/compatibility/index.d.ts +0 -0
- {node v22.15 → node v22.17}/compatibility/indexable.d.ts +0 -0
- {node v22.15 → node v22.17}/compatibility/iterators.d.ts +0 -0
- {node v22.15 → node v22.17}/console.d.ts +0 -0
- {node v22.15 → node v22.17}/constants.d.ts +0 -0
- {node v22.15 → node v22.17}/dgram.d.ts +0 -0
- {node v22.15 → node v22.17}/diagnostics_channel.d.ts +0 -0
- {node v22.15 → node v22.17}/dom-events.d.ts +0 -0
- {node v22.15 → node v22.17}/domain.d.ts +0 -0
- {node v22.15 → node v22.17}/globals.d.ts +0 -0
- {node v22.15 → node v22.17}/globals.typedarray.d.ts +0 -0
- {node v22.15 → node v22.17}/https.d.ts +0 -0
- {node v22.15 → node v22.17}/index.d.ts +0 -0
- {node v22.15 → node v22.17}/net.d.ts +0 -0
- {node v22.15 → node v22.17}/os.d.ts +0 -0
- {node v22.15 → node v22.17}/path.d.ts +0 -0
- {node v22.15 → node v22.17}/perf_hooks.d.ts +0 -0
- {node v22.15 → node v22.17}/punycode.d.ts +0 -0
- {node v22.15 → node v22.17}/querystring.d.ts +0 -0
- {node v22.15 → node v22.17}/readline.d.ts +0 -0
- {node v22.15 → node v22.17}/sea.d.ts +0 -0
- {node v22.15 → node v22.17}/stream/consumers.d.ts +0 -0
- {node v22.15 → node v22.17}/stream/promises.d.ts +0 -0
- {node v22.15 → node v22.17}/string_decoder.d.ts +0 -0
- {node v22.15 → node v22.17}/timers/promises.d.ts +0 -0
- {node v22.15 → node v22.17}/timers.d.ts +0 -0
- {node v22.15 → node v22.17}/tls.d.ts +0 -0
- {node v22.15 → node v22.17}/trace_events.d.ts +0 -0
- {node v22.15 → node v22.17}/ts5.6/buffer.buffer.d.ts +0 -0
- {node v22.15 → node v22.17}/ts5.6/globals.typedarray.d.ts +0 -0
- {node v22.15 → node v22.17}/ts5.6/index.d.ts +0 -0
- {node v22.15 → node v22.17}/tty.d.ts +0 -0
- {node v22.15 → node v22.17}/vm.d.ts +0 -0
- {node v22.15 → node v22.17}/wasi.d.ts +0 -0
node v22.17/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Installation
|
|
2
|
+
> `npm install --save @types/node`
|
|
3
|
+
|
|
4
|
+
# Summary
|
|
5
|
+
This package contains type definitions for node (https://nodejs.org/).
|
|
6
|
+
|
|
7
|
+
# Details
|
|
8
|
+
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v22.
|
|
9
|
+
|
|
10
|
+
### Additional Details
|
|
11
|
+
* Last updated: Fri, 15 Aug 2025 08:39:32 GMT
|
|
12
|
+
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
|
+
|
|
14
|
+
# Credits
|
|
15
|
+
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [David Junger](https://github.com/touffy), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Sebastian Silbermann](https://github.com/eps1lon), [Wilco Bakker](https://github.com/WilcoBakker), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), [Dmitry Semigradsky](https://github.com/Semigradsky), and [René](https://github.com/Renegade334).
|
|
@@ -118,7 +118,6 @@ declare module "buffer" {
|
|
|
118
118
|
* Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using
|
|
119
119
|
* a prior call to `URL.createObjectURL()`.
|
|
120
120
|
* @since v16.7.0
|
|
121
|
-
* @experimental
|
|
122
121
|
* @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
|
|
123
122
|
*/
|
|
124
123
|
export function resolveObjectURL(id: string): Blob | undefined;
|
|
@@ -1702,6 +1701,8 @@ declare module "buffer" {
|
|
|
1702
1701
|
* @return A reference to `buf`.
|
|
1703
1702
|
*/
|
|
1704
1703
|
fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this;
|
|
1704
|
+
fill(value: string | Uint8Array | number, offset: number, encoding: BufferEncoding): this;
|
|
1705
|
+
fill(value: string | Uint8Array | number, encoding: BufferEncoding): this;
|
|
1705
1706
|
/**
|
|
1706
1707
|
* If `value` is:
|
|
1707
1708
|
*
|
|
@@ -1771,6 +1772,7 @@ declare module "buffer" {
|
|
|
1771
1772
|
* @return The index of the first occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
|
|
1772
1773
|
*/
|
|
1773
1774
|
indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
|
|
1775
|
+
indexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number;
|
|
1774
1776
|
/**
|
|
1775
1777
|
* Identical to `buf.indexOf()`, except the last occurrence of `value` is found
|
|
1776
1778
|
* rather than the first occurrence.
|
|
@@ -1839,6 +1841,7 @@ declare module "buffer" {
|
|
|
1839
1841
|
* @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
|
|
1840
1842
|
*/
|
|
1841
1843
|
lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
|
|
1844
|
+
lastIndexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number;
|
|
1842
1845
|
/**
|
|
1843
1846
|
* Equivalent to `buf.indexOf() !== -1`.
|
|
1844
1847
|
*
|
|
@@ -1869,6 +1872,7 @@ declare module "buffer" {
|
|
|
1869
1872
|
* @return `true` if `value` was found in `buf`, `false` otherwise.
|
|
1870
1873
|
*/
|
|
1871
1874
|
includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean;
|
|
1875
|
+
includes(value: string | number | Buffer, encoding: BufferEncoding): boolean;
|
|
1872
1876
|
}
|
|
1873
1877
|
var Buffer: BufferConstructor;
|
|
1874
1878
|
/**
|
|
@@ -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;
|
|
@@ -3764,7 +3764,23 @@ declare module "crypto" {
|
|
|
3764
3764
|
*/
|
|
3765
3765
|
checkIP(ip: string): string | undefined;
|
|
3766
3766
|
/**
|
|
3767
|
-
* Checks whether this certificate was issued by the given `otherCert
|
|
3767
|
+
* Checks whether this certificate was potentially issued by the given `otherCert`
|
|
3768
|
+
* by comparing the certificate metadata.
|
|
3769
|
+
*
|
|
3770
|
+
* This is useful for pruning a list of possible issuer certificates which have been
|
|
3771
|
+
* selected using a more rudimentary filtering routine, i.e. just based on subject
|
|
3772
|
+
* and issuer names.
|
|
3773
|
+
*
|
|
3774
|
+
* Finally, to verify that this certificate's signature was produced by a private key
|
|
3775
|
+
* corresponding to `otherCert`'s public key use `x509.verify(publicKey)`
|
|
3776
|
+
* with `otherCert`'s public key represented as a `KeyObject`
|
|
3777
|
+
* like so
|
|
3778
|
+
*
|
|
3779
|
+
* ```js
|
|
3780
|
+
* if (!x509.verify(otherCert.publicKey)) {
|
|
3781
|
+
* throw new Error('otherCert did not issue x509');
|
|
3782
|
+
* }
|
|
3783
|
+
* ```
|
|
3768
3784
|
* @since v15.6.0
|
|
3769
3785
|
*/
|
|
3770
3786
|
checkIssued(otherCert: X509Certificate): boolean;
|
|
@@ -127,24 +127,25 @@ declare module "dns/promises" {
|
|
|
127
127
|
* @param [rrtype='A'] Resource record type.
|
|
128
128
|
*/
|
|
129
129
|
function resolve(hostname: string): Promise<string[]>;
|
|
130
|
-
function resolve(hostname: string, rrtype: "A"): Promise<string[]>;
|
|
131
|
-
function resolve(hostname: string, rrtype: "AAAA"): Promise<string[]>;
|
|
130
|
+
function resolve(hostname: string, rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
|
|
132
131
|
function resolve(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
|
|
133
132
|
function resolve(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
|
|
134
|
-
function resolve(hostname: string, rrtype: "CNAME"): Promise<string[]>;
|
|
135
133
|
function resolve(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
|
|
136
134
|
function resolve(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
|
|
137
|
-
function resolve(hostname: string, rrtype: "NS"): Promise<string[]>;
|
|
138
|
-
function resolve(hostname: string, rrtype: "PTR"): Promise<string[]>;
|
|
139
135
|
function resolve(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
|
|
140
136
|
function resolve(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
|
|
141
137
|
function resolve(hostname: string, rrtype: "TLSA"): Promise<TlsaRecord[]>;
|
|
142
138
|
function resolve(hostname: string, rrtype: "TXT"): Promise<string[][]>;
|
|
143
|
-
function resolve(
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
139
|
+
function resolve(hostname: string, rrtype: string): Promise<
|
|
140
|
+
| string[]
|
|
141
|
+
| CaaRecord[]
|
|
142
|
+
| MxRecord[]
|
|
143
|
+
| NaptrRecord[]
|
|
144
|
+
| SoaRecord
|
|
145
|
+
| SrvRecord[]
|
|
146
|
+
| TlsaRecord[]
|
|
147
|
+
| string[][]
|
|
148
|
+
| AnyRecord[]
|
|
148
149
|
>;
|
|
149
150
|
/**
|
|
150
151
|
* Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv4
|
|
@@ -250,6 +250,9 @@ declare module "dns" {
|
|
|
250
250
|
contactemail?: string | undefined;
|
|
251
251
|
contactphone?: string | undefined;
|
|
252
252
|
}
|
|
253
|
+
export interface AnyCaaRecord extends CaaRecord {
|
|
254
|
+
type: "CAA";
|
|
255
|
+
}
|
|
253
256
|
export interface MxRecord {
|
|
254
257
|
priority: number;
|
|
255
258
|
exchange: string;
|
|
@@ -317,6 +320,7 @@ declare module "dns" {
|
|
|
317
320
|
export type AnyRecord =
|
|
318
321
|
| AnyARecord
|
|
319
322
|
| AnyAaaaRecord
|
|
323
|
+
| AnyCaaRecord
|
|
320
324
|
| AnyCnameRecord
|
|
321
325
|
| AnyMxRecord
|
|
322
326
|
| AnyNaptrRecord
|
|
@@ -345,12 +349,7 @@ declare module "dns" {
|
|
|
345
349
|
): void;
|
|
346
350
|
export function resolve(
|
|
347
351
|
hostname: string,
|
|
348
|
-
rrtype: "A",
|
|
349
|
-
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
350
|
-
): void;
|
|
351
|
-
export function resolve(
|
|
352
|
-
hostname: string,
|
|
353
|
-
rrtype: "AAAA",
|
|
352
|
+
rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR",
|
|
354
353
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
355
354
|
): void;
|
|
356
355
|
export function resolve(
|
|
@@ -360,8 +359,8 @@ declare module "dns" {
|
|
|
360
359
|
): void;
|
|
361
360
|
export function resolve(
|
|
362
361
|
hostname: string,
|
|
363
|
-
rrtype: "
|
|
364
|
-
callback: (err: NodeJS.ErrnoException | null,
|
|
362
|
+
rrtype: "CAA",
|
|
363
|
+
callback: (err: NodeJS.ErrnoException | null, address: CaaRecord[]) => void,
|
|
365
364
|
): void;
|
|
366
365
|
export function resolve(
|
|
367
366
|
hostname: string,
|
|
@@ -373,16 +372,6 @@ declare module "dns" {
|
|
|
373
372
|
rrtype: "NAPTR",
|
|
374
373
|
callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
|
|
375
374
|
): void;
|
|
376
|
-
export function resolve(
|
|
377
|
-
hostname: string,
|
|
378
|
-
rrtype: "NS",
|
|
379
|
-
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
380
|
-
): void;
|
|
381
|
-
export function resolve(
|
|
382
|
-
hostname: string,
|
|
383
|
-
rrtype: "PTR",
|
|
384
|
-
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
385
|
-
): void;
|
|
386
375
|
export function resolve(
|
|
387
376
|
hostname: string,
|
|
388
377
|
rrtype: "SOA",
|
|
@@ -410,6 +399,7 @@ declare module "dns" {
|
|
|
410
399
|
err: NodeJS.ErrnoException | null,
|
|
411
400
|
addresses:
|
|
412
401
|
| string[]
|
|
402
|
+
| CaaRecord[]
|
|
413
403
|
| MxRecord[]
|
|
414
404
|
| NaptrRecord[]
|
|
415
405
|
| SoaRecord
|
|
@@ -422,6 +412,7 @@ declare module "dns" {
|
|
|
422
412
|
export namespace resolve {
|
|
423
413
|
function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
|
|
424
414
|
function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
|
|
415
|
+
function __promisify__(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
|
|
425
416
|
function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
|
|
426
417
|
function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
|
|
427
418
|
function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
|
|
@@ -432,7 +423,15 @@ declare module "dns" {
|
|
|
432
423
|
hostname: string,
|
|
433
424
|
rrtype: string,
|
|
434
425
|
): Promise<
|
|
435
|
-
|
|
426
|
+
| string[]
|
|
427
|
+
| CaaRecord[]
|
|
428
|
+
| MxRecord[]
|
|
429
|
+
| NaptrRecord[]
|
|
430
|
+
| SoaRecord
|
|
431
|
+
| SrvRecord[]
|
|
432
|
+
| TlsaRecord[]
|
|
433
|
+
| string[][]
|
|
434
|
+
| AnyRecord[]
|
|
436
435
|
>;
|
|
437
436
|
}
|
|
438
437
|
/**
|
|
@@ -88,6 +88,9 @@ declare module "fs/promises" {
|
|
|
88
88
|
highWaterMark?: number | undefined;
|
|
89
89
|
flush?: boolean | undefined;
|
|
90
90
|
}
|
|
91
|
+
interface ReadableWebStreamOptions {
|
|
92
|
+
autoClose?: boolean | undefined;
|
|
93
|
+
}
|
|
91
94
|
// TODO: Add `EventEmitter` close
|
|
92
95
|
interface FileHandle {
|
|
93
96
|
/**
|
|
@@ -260,9 +263,8 @@ declare module "fs/promises" {
|
|
|
260
263
|
* While the `ReadableStream` will read the file to completion, it will not
|
|
261
264
|
* close the `FileHandle` automatically. User code must still call the`fileHandle.close()` method.
|
|
262
265
|
* @since v17.0.0
|
|
263
|
-
* @experimental
|
|
264
266
|
*/
|
|
265
|
-
readableWebStream(): ReadableStream;
|
|
267
|
+
readableWebStream(options?: ReadableWebStreamOptions): ReadableStream;
|
|
266
268
|
/**
|
|
267
269
|
* Asynchronously reads the entire contents of a file.
|
|
268
270
|
*
|
|
@@ -475,7 +477,8 @@ declare module "fs/promises" {
|
|
|
475
477
|
*/
|
|
476
478
|
close(): Promise<void>;
|
|
477
479
|
/**
|
|
478
|
-
*
|
|
480
|
+
* Calls `filehandle.close()` and returns a promise that fulfills when the
|
|
481
|
+
* filehandle is closed.
|
|
479
482
|
* @since v20.4.0
|
|
480
483
|
*/
|
|
481
484
|
[Symbol.asyncDispose](): Promise<void>;
|
|
@@ -1252,20 +1255,28 @@ declare module "fs/promises" {
|
|
|
1252
1255
|
*/
|
|
1253
1256
|
function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise<void>;
|
|
1254
1257
|
/**
|
|
1255
|
-
*
|
|
1258
|
+
* ```js
|
|
1259
|
+
* import { glob } from 'node:fs/promises';
|
|
1260
|
+
*
|
|
1261
|
+
* for await (const entry of glob('*.js'))
|
|
1262
|
+
* console.log(entry);
|
|
1263
|
+
* ```
|
|
1264
|
+
* @since v22.0.0
|
|
1265
|
+
* @returns An AsyncIterator that yields the paths of files
|
|
1266
|
+
* that match the pattern.
|
|
1256
1267
|
*/
|
|
1257
|
-
function glob(pattern: string | string[]): NodeJS.AsyncIterator<string>;
|
|
1268
|
+
function glob(pattern: string | readonly string[]): NodeJS.AsyncIterator<string>;
|
|
1258
1269
|
function glob(
|
|
1259
|
-
pattern: string | string[],
|
|
1260
|
-
|
|
1270
|
+
pattern: string | readonly string[],
|
|
1271
|
+
options: GlobOptionsWithFileTypes,
|
|
1261
1272
|
): NodeJS.AsyncIterator<Dirent>;
|
|
1262
1273
|
function glob(
|
|
1263
|
-
pattern: string | string[],
|
|
1264
|
-
|
|
1274
|
+
pattern: string | readonly string[],
|
|
1275
|
+
options: GlobOptionsWithoutFileTypes,
|
|
1265
1276
|
): NodeJS.AsyncIterator<string>;
|
|
1266
1277
|
function glob(
|
|
1267
|
-
pattern: string | string[],
|
|
1268
|
-
|
|
1278
|
+
pattern: string | readonly string[],
|
|
1279
|
+
options: GlobOptions,
|
|
1269
1280
|
): NodeJS.AsyncIterator<Dirent | string>;
|
|
1270
1281
|
}
|
|
1271
1282
|
declare module "node:fs/promises" {
|