@types/node 18.11.5 → 20.2.5
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 +2 -2
- node/assert.d.ts +86 -75
- node/async_hooks.d.ts +66 -37
- node/buffer.d.ts +193 -100
- node/child_process.d.ts +82 -56
- node/cluster.d.ts +12 -12
- node/console.d.ts +5 -5
- node/crypto.d.ts +233 -235
- node/dgram.d.ts +15 -15
- node/diagnostics_channel.d.ts +59 -21
- node/dns/promises.d.ts +50 -6
- node/dns.d.ts +26 -17
- node/domain.d.ts +4 -4
- node/events.d.ts +111 -65
- node/fs/promises.d.ts +99 -47
- node/fs.d.ts +244 -73
- node/globals.d.ts +6 -3
- node/http.d.ts +265 -148
- node/http2.d.ts +42 -47
- node/https.d.ts +53 -153
- node/index.d.ts +2 -1
- node/inspector.d.ts +10 -3
- node/module.d.ts +6 -4
- node/net.d.ts +32 -15
- node/os.d.ts +27 -16
- node/package.json +9 -4
- node/path.d.ts +4 -4
- node/perf_hooks.d.ts +28 -15
- node/process.d.ts +49 -46
- node/punycode.d.ts +1 -1
- node/querystring.d.ts +5 -5
- node/readline/promises.d.ts +65 -63
- node/readline.d.ts +32 -159
- node/repl.d.ts +20 -20
- node/stream/consumers.d.ts +1 -1
- node/stream.d.ts +950 -869
- node/string_decoder.d.ts +6 -6
- node/test.d.ts +877 -139
- node/timers/promises.d.ts +26 -1
- node/timers.d.ts +125 -4
- node/tls.d.ts +120 -29
- node/trace_events.d.ts +20 -9
- node/ts4.8/assert.d.ts +86 -75
- node/ts4.8/async_hooks.d.ts +66 -37
- node/ts4.8/buffer.d.ts +193 -101
- node/ts4.8/child_process.d.ts +82 -56
- node/ts4.8/cluster.d.ts +12 -12
- node/ts4.8/console.d.ts +5 -5
- node/ts4.8/crypto.d.ts +230 -233
- node/ts4.8/dgram.d.ts +15 -15
- node/ts4.8/diagnostics_channel.d.ts +59 -21
- node/ts4.8/dns/promises.d.ts +50 -6
- node/ts4.8/dns.d.ts +26 -17
- node/ts4.8/domain.d.ts +4 -4
- node/ts4.8/events.d.ts +111 -65
- node/ts4.8/fs/promises.d.ts +97 -46
- node/ts4.8/fs.d.ts +244 -73
- node/ts4.8/globals.d.ts +21 -12
- node/ts4.8/http.d.ts +265 -148
- node/ts4.8/http2.d.ts +42 -47
- node/ts4.8/https.d.ts +53 -153
- node/ts4.8/inspector.d.ts +10 -3
- node/ts4.8/module.d.ts +6 -4
- node/ts4.8/net.d.ts +33 -16
- node/ts4.8/os.d.ts +27 -16
- node/ts4.8/path.d.ts +4 -4
- node/ts4.8/perf_hooks.d.ts +28 -15
- node/ts4.8/process.d.ts +49 -46
- node/ts4.8/punycode.d.ts +1 -1
- node/ts4.8/querystring.d.ts +5 -5
- node/ts4.8/readline/promises.d.ts +65 -63
- node/ts4.8/readline.d.ts +32 -159
- node/ts4.8/repl.d.ts +20 -20
- node/ts4.8/stream/consumers.d.ts +1 -1
- node/ts4.8/stream.d.ts +192 -140
- node/ts4.8/string_decoder.d.ts +6 -6
- node/ts4.8/test.d.ts +877 -139
- node/ts4.8/timers/promises.d.ts +26 -1
- node/ts4.8/timers.d.ts +125 -4
- node/ts4.8/tls.d.ts +120 -29
- node/ts4.8/trace_events.d.ts +20 -9
- node/ts4.8/tty.d.ts +4 -5
- node/ts4.8/url.d.ts +46 -42
- node/ts4.8/util.d.ts +325 -123
- node/ts4.8/v8.d.ts +253 -14
- node/ts4.8/vm.d.ts +417 -32
- node/ts4.8/wasi.d.ts +13 -19
- node/ts4.8/worker_threads.d.ts +38 -34
- node/ts4.8/zlib.d.ts +11 -11
- node/tty.d.ts +4 -5
- node/url.d.ts +46 -42
- node/util.d.ts +325 -123
- node/v8.d.ts +253 -14
- node/vm.d.ts +417 -32
- node/wasi.d.ts +13 -19
- node/worker_threads.d.ts +38 -34
- node/zlib.d.ts +11 -11
node/ts4.8/globals.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ interface AbortController {
|
|
|
53
53
|
/**
|
|
54
54
|
* Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
|
|
55
55
|
*/
|
|
56
|
-
abort(): void;
|
|
56
|
+
abort(reason?: any): void;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
|
|
@@ -62,18 +62,26 @@ interface AbortSignal extends EventTarget {
|
|
|
62
62
|
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
|
|
63
63
|
*/
|
|
64
64
|
readonly aborted: boolean;
|
|
65
|
+
readonly reason: any;
|
|
66
|
+
onabort: null | ((this: AbortSignal, event: Event) => any);
|
|
67
|
+
throwIfAborted(): void;
|
|
65
68
|
}
|
|
66
69
|
|
|
67
|
-
declare var AbortController: {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
declare var AbortController: typeof globalThis extends {onmessage: any; AbortController: infer T}
|
|
71
|
+
? T
|
|
72
|
+
: {
|
|
73
|
+
prototype: AbortController;
|
|
74
|
+
new(): AbortController;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
declare var AbortSignal: typeof globalThis extends {onmessage: any; AbortSignal: infer T}
|
|
78
|
+
? T
|
|
79
|
+
: {
|
|
80
|
+
prototype: AbortSignal;
|
|
81
|
+
new(): AbortSignal;
|
|
82
|
+
abort(reason?: any): AbortSignal;
|
|
83
|
+
timeout(milliseconds: number): AbortSignal;
|
|
84
|
+
};
|
|
77
85
|
//#endregion borrowed
|
|
78
86
|
|
|
79
87
|
//#region ArrayLike.at()
|
|
@@ -87,6 +95,7 @@ interface RelativeIndexable<T> {
|
|
|
87
95
|
}
|
|
88
96
|
interface String extends RelativeIndexable<string> {}
|
|
89
97
|
interface Array<T> extends RelativeIndexable<T> {}
|
|
98
|
+
interface ReadonlyArray<T> extends RelativeIndexable<T> {}
|
|
90
99
|
interface Int8Array extends RelativeIndexable<number> {}
|
|
91
100
|
interface Uint8Array extends RelativeIndexable<number> {}
|
|
92
101
|
interface Uint8ClampedArray extends RelativeIndexable<number> {}
|
|
@@ -151,7 +160,7 @@ declare namespace NodeJS {
|
|
|
151
160
|
/**
|
|
152
161
|
* Name of the script [if this function was defined in a script]
|
|
153
162
|
*/
|
|
154
|
-
getFileName(): string |
|
|
163
|
+
getFileName(): string | undefined;
|
|
155
164
|
|
|
156
165
|
/**
|
|
157
166
|
* Current line number [if this function was defined in a script]
|