@types/node 20.6.2 → 20.6.4
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 +1 -1
- node/assert/strict.d.ts +4 -4
- node/assert.d.ts +48 -24
- node/async_hooks.d.ts +13 -6
- node/buffer.d.ts +32 -34
- node/child_process.d.ts +262 -122
- node/cluster.d.ts +107 -89
- node/console.d.ts +7 -7
- node/constants.d.ts +12 -11
- node/crypto.d.ts +746 -268
- node/dgram.d.ts +81 -45
- node/diagnostics_channel.d.ts +3 -3
- node/dns/promises.d.ts +28 -25
- node/dns.d.ts +203 -62
- node/dom-events.d.ts +67 -71
- node/domain.d.ts +4 -4
- node/events.d.ts +15 -7
- node/fs/promises.d.ts +102 -73
- node/fs.d.ts +513 -311
- node/globals.d.ts +18 -20
- node/http.d.ts +238 -186
- node/http2.d.ts +628 -376
- node/https.d.ts +221 -112
- node/inspector.d.ts +3 -3
- node/module.d.ts +16 -9
- node/net.d.ts +112 -93
- node/os.d.ts +7 -7
- node/package.json +2 -2
- node/path.d.ts +13 -13
- node/perf_hooks.d.ts +19 -18
- node/process.d.ts +155 -125
- node/punycode.d.ts +3 -3
- node/querystring.d.ts +14 -4
- node/readline/promises.d.ts +12 -7
- node/readline.d.ts +69 -56
- node/repl.d.ts +67 -61
- node/stream/consumers.d.ts +5 -5
- node/stream/promises.d.ts +56 -15
- node/stream/web.d.ts +26 -20
- node/stream.d.ts +361 -228
- node/string_decoder.d.ts +3 -3
- node/test.d.ts +78 -93
- node/timers/promises.d.ts +4 -4
- node/timers.d.ts +23 -8
- node/tls.d.ts +151 -71
- node/trace_events.d.ts +3 -3
- node/ts4.8/assert/strict.d.ts +4 -4
- node/ts4.8/assert.d.ts +48 -24
- node/ts4.8/async_hooks.d.ts +13 -6
- node/ts4.8/buffer.d.ts +32 -34
- node/ts4.8/child_process.d.ts +262 -122
- node/ts4.8/cluster.d.ts +107 -89
- node/ts4.8/console.d.ts +7 -7
- node/ts4.8/constants.d.ts +12 -11
- node/ts4.8/crypto.d.ts +746 -268
- node/ts4.8/dgram.d.ts +81 -45
- node/ts4.8/diagnostics_channel.d.ts +3 -3
- node/ts4.8/dns/promises.d.ts +28 -25
- node/ts4.8/dns.d.ts +203 -62
- node/ts4.8/dom-events.d.ts +67 -71
- node/ts4.8/domain.d.ts +4 -4
- node/ts4.8/events.d.ts +15 -7
- node/ts4.8/fs/promises.d.ts +102 -73
- node/ts4.8/fs.d.ts +513 -311
- node/ts4.8/globals.d.ts +18 -20
- node/ts4.8/http.d.ts +238 -186
- node/ts4.8/http2.d.ts +628 -376
- node/ts4.8/https.d.ts +221 -112
- node/ts4.8/inspector.d.ts +3 -3
- node/ts4.8/module.d.ts +16 -9
- node/ts4.8/net.d.ts +112 -93
- node/ts4.8/os.d.ts +7 -7
- node/ts4.8/path.d.ts +13 -13
- node/ts4.8/perf_hooks.d.ts +19 -18
- node/ts4.8/process.d.ts +155 -125
- node/ts4.8/punycode.d.ts +3 -3
- node/ts4.8/querystring.d.ts +14 -4
- node/ts4.8/readline/promises.d.ts +12 -7
- node/ts4.8/readline.d.ts +69 -56
- node/ts4.8/repl.d.ts +67 -61
- node/ts4.8/stream/consumers.d.ts +5 -5
- node/ts4.8/stream/promises.d.ts +56 -15
- node/ts4.8/stream/web.d.ts +26 -20
- node/ts4.8/stream.d.ts +326 -219
- node/ts4.8/string_decoder.d.ts +3 -3
- node/ts4.8/test.d.ts +78 -93
- node/ts4.8/timers/promises.d.ts +4 -4
- node/ts4.8/timers.d.ts +23 -8
- node/ts4.8/tls.d.ts +151 -71
- node/ts4.8/trace_events.d.ts +3 -3
- node/ts4.8/tty.d.ts +10 -10
- node/ts4.8/url.d.ts +26 -14
- node/ts4.8/util.d.ts +178 -116
- node/ts4.8/v8.d.ts +4 -4
- node/ts4.8/vm.d.ts +52 -46
- node/ts4.8/wasi.d.ts +3 -3
- node/ts4.8/worker_threads.d.ts +81 -84
- node/ts4.8/zlib.d.ts +9 -9
- node/tty.d.ts +10 -10
- node/url.d.ts +26 -14
- node/util.d.ts +178 -116
- node/v8.d.ts +4 -4
- node/vm.d.ts +52 -46
- node/wasi.d.ts +3 -3
- node/worker_threads.d.ts +81 -84
- node/zlib.d.ts +9 -9
node/globals.d.ts
CHANGED
|
@@ -20,9 +20,9 @@ interface ErrorConstructor {
|
|
|
20
20
|
------------------------------------------------*/
|
|
21
21
|
|
|
22
22
|
// For backwards compability
|
|
23
|
-
interface NodeRequire extends NodeJS.Require {
|
|
24
|
-
interface RequireResolve extends NodeJS.RequireResolve {
|
|
25
|
-
interface NodeModule extends NodeJS.Module {
|
|
23
|
+
interface NodeRequire extends NodeJS.Require {}
|
|
24
|
+
interface RequireResolve extends NodeJS.RequireResolve {}
|
|
25
|
+
interface NodeModule extends NodeJS.Module {}
|
|
26
26
|
|
|
27
27
|
declare var process: NodeJS.Process;
|
|
28
28
|
declare var console: Console;
|
|
@@ -41,7 +41,7 @@ declare var exports: any;
|
|
|
41
41
|
*/
|
|
42
42
|
declare var gc: undefined | (() => void);
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
// #region borrowed
|
|
45
45
|
// from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib
|
|
46
46
|
/** A controller object that allows you to abort one or more DOM requests as and when desired. */
|
|
47
47
|
interface AbortController {
|
|
@@ -67,24 +67,22 @@ interface AbortSignal extends EventTarget {
|
|
|
67
67
|
throwIfAborted(): void;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
declare var AbortController: typeof globalThis extends {onmessage: any; AbortController: infer T}
|
|
71
|
-
? T
|
|
70
|
+
declare var AbortController: typeof globalThis extends { onmessage: any; AbortController: infer T } ? T
|
|
72
71
|
: {
|
|
73
72
|
prototype: AbortController;
|
|
74
73
|
new(): AbortController;
|
|
75
74
|
};
|
|
76
75
|
|
|
77
|
-
declare var AbortSignal: typeof globalThis extends {onmessage: any; AbortSignal: infer T}
|
|
78
|
-
? T
|
|
76
|
+
declare var AbortSignal: typeof globalThis extends { onmessage: any; AbortSignal: infer T } ? T
|
|
79
77
|
: {
|
|
80
78
|
prototype: AbortSignal;
|
|
81
79
|
new(): AbortSignal;
|
|
82
80
|
abort(reason?: any): AbortSignal;
|
|
83
81
|
timeout(milliseconds: number): AbortSignal;
|
|
84
82
|
};
|
|
85
|
-
|
|
83
|
+
// #endregion borrowed
|
|
86
84
|
|
|
87
|
-
|
|
85
|
+
// #region Disposable
|
|
88
86
|
interface SymbolConstructor {
|
|
89
87
|
/**
|
|
90
88
|
* A method that is used to release resources held by an object. Called by the semantics of the `using` statement.
|
|
@@ -104,9 +102,9 @@ interface Disposable {
|
|
|
104
102
|
interface AsyncDisposable {
|
|
105
103
|
[Symbol.asyncDispose](): PromiseLike<void>;
|
|
106
104
|
}
|
|
107
|
-
|
|
105
|
+
// #endregion Disposable
|
|
108
106
|
|
|
109
|
-
|
|
107
|
+
// #region ArrayLike.at()
|
|
110
108
|
interface RelativeIndexable<T> {
|
|
111
109
|
/**
|
|
112
110
|
* Takes an integer value and returns the item at that index,
|
|
@@ -129,7 +127,7 @@ interface Float32Array extends RelativeIndexable<number> {}
|
|
|
129
127
|
interface Float64Array extends RelativeIndexable<number> {}
|
|
130
128
|
interface BigInt64Array extends RelativeIndexable<bigint> {}
|
|
131
129
|
interface BigUint64Array extends RelativeIndexable<bigint> {}
|
|
132
|
-
|
|
130
|
+
// #endregion ArrayLike.at() end
|
|
133
131
|
|
|
134
132
|
/**
|
|
135
133
|
* @since v17.0.0
|
|
@@ -138,7 +136,7 @@ interface BigUint64Array extends RelativeIndexable<bigint> {}
|
|
|
138
136
|
*/
|
|
139
137
|
declare function structuredClone<T>(
|
|
140
138
|
value: T,
|
|
141
|
-
transfer?: { transfer: ReadonlyArray<import(
|
|
139
|
+
transfer?: { transfer: ReadonlyArray<import("worker_threads").TransferListItem> },
|
|
142
140
|
): T;
|
|
143
141
|
|
|
144
142
|
/*----------------------------------------------*
|
|
@@ -235,7 +233,7 @@ declare namespace NodeJS {
|
|
|
235
233
|
pause(): this;
|
|
236
234
|
resume(): this;
|
|
237
235
|
isPaused(): boolean;
|
|
238
|
-
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined
|
|
236
|
+
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
|
|
239
237
|
unpipe(destination?: WritableStream): this;
|
|
240
238
|
unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
|
|
241
239
|
wrap(oldStream: ReadableStream): this;
|
|
@@ -251,7 +249,7 @@ declare namespace NodeJS {
|
|
|
251
249
|
end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
|
|
252
250
|
}
|
|
253
251
|
|
|
254
|
-
interface ReadWriteStream extends ReadableStream, WritableStream {
|
|
252
|
+
interface ReadWriteStream extends ReadableStream, WritableStream {}
|
|
255
253
|
|
|
256
254
|
interface RefCounted {
|
|
257
255
|
ref(): this;
|
|
@@ -284,14 +282,14 @@ declare namespace NodeJS {
|
|
|
284
282
|
}
|
|
285
283
|
|
|
286
284
|
interface RequireResolve {
|
|
287
|
-
(id: string, options?: { paths?: string[] | undefined
|
|
285
|
+
(id: string, options?: { paths?: string[] | undefined }): string;
|
|
288
286
|
paths(request: string): string[] | null;
|
|
289
287
|
}
|
|
290
288
|
|
|
291
289
|
interface RequireExtensions extends Dict<(m: Module, filename: string) => any> {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
290
|
+
".js": (m: Module, filename: string) => any;
|
|
291
|
+
".json": (m: Module, filename: string) => any;
|
|
292
|
+
".node": (m: Module, filename: string) => any;
|
|
295
293
|
}
|
|
296
294
|
interface Module {
|
|
297
295
|
/**
|