@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/repl.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `repl` module provides a Read-Eval-Print-Loop (REPL) implementation
|
|
3
|
-
* is available both as a standalone program or includible in other
|
|
4
|
-
* It can be accessed using:
|
|
2
|
+
* The `node:repl` module provides a Read-Eval-Print-Loop (REPL) implementation
|
|
3
|
+
* that is available both as a standalone program or includible in other
|
|
4
|
+
* applications. It can be accessed using:
|
|
5
5
|
*
|
|
6
6
|
* ```js
|
|
7
|
-
* const repl = require('repl');
|
|
7
|
+
* const repl = require('node:repl');
|
|
8
8
|
* ```
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/repl.js)
|
|
10
10
|
*/
|
|
11
11
|
declare module 'repl' {
|
|
12
12
|
import { Interface, Completer, AsyncCompleter } from 'node:readline';
|
|
@@ -41,8 +41,8 @@ declare module 'repl' {
|
|
|
41
41
|
* error with `repl.Recoverable` to indicate the input was incomplete and prompt for
|
|
42
42
|
* additional lines.
|
|
43
43
|
*
|
|
44
|
-
* @see https://nodejs.org/dist/latest-
|
|
45
|
-
* @see https://nodejs.org/dist/latest-
|
|
44
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_default_evaluation
|
|
45
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_custom_evaluation_functions
|
|
46
46
|
*/
|
|
47
47
|
eval?: REPLEval | undefined;
|
|
48
48
|
/**
|
|
@@ -74,13 +74,13 @@ declare module 'repl' {
|
|
|
74
74
|
* The function to invoke to format the output of each command before writing to `output`.
|
|
75
75
|
* Default: a wrapper for `util.inspect`.
|
|
76
76
|
*
|
|
77
|
-
* @see https://nodejs.org/dist/latest-
|
|
77
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_customizing_repl_output
|
|
78
78
|
*/
|
|
79
79
|
writer?: REPLWriter | undefined;
|
|
80
80
|
/**
|
|
81
81
|
* An optional function used for custom Tab auto completion.
|
|
82
82
|
*
|
|
83
|
-
* @see https://nodejs.org/dist/latest-
|
|
83
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#readline_use_of_the_completer_function
|
|
84
84
|
*/
|
|
85
85
|
completer?: Completer | AsyncCompleter | undefined;
|
|
86
86
|
/**
|
|
@@ -124,7 +124,7 @@ declare module 'repl' {
|
|
|
124
124
|
* or directly using the JavaScript `new` keyword.
|
|
125
125
|
*
|
|
126
126
|
* ```js
|
|
127
|
-
* const repl = require('repl');
|
|
127
|
+
* const repl = require('node:repl');
|
|
128
128
|
*
|
|
129
129
|
* const options = { useColors: true };
|
|
130
130
|
*
|
|
@@ -162,33 +162,33 @@ declare module 'repl' {
|
|
|
162
162
|
/**
|
|
163
163
|
* A value indicating whether the REPL is currently in "editor mode".
|
|
164
164
|
*
|
|
165
|
-
* @see https://nodejs.org/dist/latest-
|
|
165
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_commands_and_special_keys
|
|
166
166
|
*/
|
|
167
167
|
readonly editorMode: boolean;
|
|
168
168
|
/**
|
|
169
169
|
* A value indicating whether the `_` variable has been assigned.
|
|
170
170
|
*
|
|
171
|
-
* @see https://nodejs.org/dist/latest-
|
|
171
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
|
172
172
|
*/
|
|
173
173
|
readonly underscoreAssigned: boolean;
|
|
174
174
|
/**
|
|
175
175
|
* The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL).
|
|
176
176
|
*
|
|
177
|
-
* @see https://nodejs.org/dist/latest-
|
|
177
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
|
178
178
|
*/
|
|
179
179
|
readonly last: any;
|
|
180
180
|
/**
|
|
181
181
|
* A value indicating whether the `_error` variable has been assigned.
|
|
182
182
|
*
|
|
183
183
|
* @since v9.8.0
|
|
184
|
-
* @see https://nodejs.org/dist/latest-
|
|
184
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
|
185
185
|
*/
|
|
186
186
|
readonly underscoreErrAssigned: boolean;
|
|
187
187
|
/**
|
|
188
188
|
* The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL).
|
|
189
189
|
*
|
|
190
190
|
* @since v9.8.0
|
|
191
|
-
* @see https://nodejs.org/dist/latest-
|
|
191
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
|
192
192
|
*/
|
|
193
193
|
readonly lastError: any;
|
|
194
194
|
/**
|
|
@@ -240,7 +240,7 @@ declare module 'repl' {
|
|
|
240
240
|
*
|
|
241
241
|
* `REPLServer` cannot be subclassed due to implementation specifics in NodeJS.
|
|
242
242
|
*
|
|
243
|
-
* @see https://nodejs.org/dist/latest-
|
|
243
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_class_replserver
|
|
244
244
|
*/
|
|
245
245
|
private constructor();
|
|
246
246
|
/**
|
|
@@ -251,7 +251,7 @@ declare module 'repl' {
|
|
|
251
251
|
* The following example shows two new commands added to the REPL instance:
|
|
252
252
|
*
|
|
253
253
|
* ```js
|
|
254
|
-
* const repl = require('repl');
|
|
254
|
+
* const repl = require('node:repl');
|
|
255
255
|
*
|
|
256
256
|
* const replServer = repl.start({ prompt: '> ' });
|
|
257
257
|
* replServer.defineCommand('sayhello', {
|
|
@@ -260,7 +260,7 @@ declare module 'repl' {
|
|
|
260
260
|
* this.clearBufferedCommand();
|
|
261
261
|
* console.log(`Hello, ${name}!`);
|
|
262
262
|
* this.displayPrompt();
|
|
263
|
-
* }
|
|
263
|
+
* },
|
|
264
264
|
* });
|
|
265
265
|
* replServer.defineCommand('saybye', function saybye() {
|
|
266
266
|
* console.log('Goodbye!');
|
|
@@ -401,7 +401,7 @@ declare module 'repl' {
|
|
|
401
401
|
* If `options` is a string, then it specifies the input prompt:
|
|
402
402
|
*
|
|
403
403
|
* ```js
|
|
404
|
-
* const repl = require('repl');
|
|
404
|
+
* const repl = require('node:repl');
|
|
405
405
|
*
|
|
406
406
|
* // a Unix style prompt
|
|
407
407
|
* repl.start('$ ');
|
|
@@ -412,7 +412,7 @@ declare module 'repl' {
|
|
|
412
412
|
/**
|
|
413
413
|
* Indicates a recoverable error that a `REPLServer` can use to support multi-line input.
|
|
414
414
|
*
|
|
415
|
-
* @see https://nodejs.org/dist/latest-
|
|
415
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_recoverable_errors
|
|
416
416
|
*/
|
|
417
417
|
class Recoverable extends SyntaxError {
|
|
418
418
|
err: Error;
|
node/stream/consumers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare module 'stream/consumers' {
|
|
2
|
-
import { Blob as NodeBlob } from
|
|
2
|
+
import { Blob as NodeBlob } from 'node:buffer';
|
|
3
3
|
import { Readable } from 'node:stream';
|
|
4
4
|
function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Buffer>;
|
|
5
5
|
function text(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<string>;
|