alicezetion 1.8.5 → 1.8.7
Sign up to get free protection for your applications and to get access to all the features.
- package/.cache/nix/binary-cache-v6.sqlite +0 -0
- package/.cache/nix/binary-cache-v6.sqlite-journal +0 -0
- package/.cache/replit/modules/nodejs-20:v25-20240206-fdbd396.res +1 -0
- package/.cache/replit/modules/replit:v4-20240206-fdbd396.res +1 -0
- package/.cache/replit/modules.stamp +0 -1
- package/.cache/replit/nix/env.json +1 -1
- package/.cache/typescript/5.3/node_modules/.package-lock.json +137 -0
- package/.cache/typescript/5.3/node_modules/@types/bluebird/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/bluebird/README.md +15 -0
- package/.cache/typescript/5.3/node_modules/@types/bluebird/index.d.ts +1365 -0
- package/.cache/typescript/5.3/node_modules/@types/bluebird/package.json +25 -0
- package/.cache/typescript/5.3/node_modules/@types/caseless/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/caseless/README.md +48 -0
- package/.cache/typescript/5.3/node_modules/@types/caseless/index.d.ts +29 -0
- package/.cache/typescript/5.3/node_modules/@types/caseless/package.json +35 -0
- package/.cache/typescript/5.3/node_modules/@types/cheerio/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/cheerio/README.md +15 -0
- package/.cache/typescript/5.3/node_modules/@types/cheerio/index.d.ts +318 -0
- package/.cache/typescript/5.3/node_modules/@types/cheerio/package.json +71 -0
- package/.cache/typescript/5.3/node_modules/@types/node/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/node/README.md +15 -0
- package/.cache/typescript/5.3/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/.cache/typescript/5.3/node_modules/@types/node/assert.d.ts +996 -0
- package/.cache/typescript/5.3/node_modules/@types/node/async_hooks.d.ts +539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/buffer.d.ts +2362 -0
- package/.cache/typescript/5.3/node_modules/@types/node/child_process.d.ts +1540 -0
- package/.cache/typescript/5.3/node_modules/@types/node/cluster.d.ts +432 -0
- package/.cache/typescript/5.3/node_modules/@types/node/console.d.ts +415 -0
- package/.cache/typescript/5.3/node_modules/@types/node/constants.d.ts +19 -0
- package/.cache/typescript/5.3/node_modules/@types/node/crypto.d.ts +4487 -0
- package/.cache/typescript/5.3/node_modules/@types/node/dgram.d.ts +596 -0
- package/.cache/typescript/5.3/node_modules/@types/node/diagnostics_channel.d.ts +545 -0
- package/.cache/typescript/5.3/node_modules/@types/node/dns/promises.d.ts +425 -0
- package/.cache/typescript/5.3/node_modules/@types/node/dns.d.ts +809 -0
- package/.cache/typescript/5.3/node_modules/@types/node/dom-events.d.ts +122 -0
- package/.cache/typescript/5.3/node_modules/@types/node/domain.d.ts +170 -0
- package/.cache/typescript/5.3/node_modules/@types/node/events.d.ts +879 -0
- package/.cache/typescript/5.3/node_modules/@types/node/fs/promises.d.ts +1239 -0
- package/.cache/typescript/5.3/node_modules/@types/node/fs.d.ts +4311 -0
- package/.cache/typescript/5.3/node_modules/@types/node/globals.d.ts +411 -0
- package/.cache/typescript/5.3/node_modules/@types/node/globals.global.d.ts +1 -0
- package/.cache/typescript/5.3/node_modules/@types/node/http.d.ts +1887 -0
- package/.cache/typescript/5.3/node_modules/@types/node/http2.d.ts +2382 -0
- package/.cache/typescript/5.3/node_modules/@types/node/https.d.ts +550 -0
- package/.cache/typescript/5.3/node_modules/@types/node/index.d.ts +88 -0
- package/.cache/typescript/5.3/node_modules/@types/node/inspector.d.ts +2747 -0
- package/.cache/typescript/5.3/node_modules/@types/node/module.d.ts +315 -0
- package/.cache/typescript/5.3/node_modules/@types/node/net.d.ts +949 -0
- package/.cache/typescript/5.3/node_modules/@types/node/os.d.ts +478 -0
- package/.cache/typescript/5.3/node_modules/@types/node/package.json +229 -0
- package/.cache/typescript/5.3/node_modules/@types/node/path.d.ts +191 -0
- package/.cache/typescript/5.3/node_modules/@types/node/perf_hooks.d.ts +645 -0
- package/.cache/typescript/5.3/node_modules/@types/node/process.d.ts +1561 -0
- package/.cache/typescript/5.3/node_modules/@types/node/punycode.d.ts +117 -0
- package/.cache/typescript/5.3/node_modules/@types/node/querystring.d.ts +141 -0
- package/.cache/typescript/5.3/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/.cache/typescript/5.3/node_modules/@types/node/readline.d.ts +539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/repl.d.ts +430 -0
- package/.cache/typescript/5.3/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/.cache/typescript/5.3/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/.cache/typescript/5.3/node_modules/@types/node/stream/web.d.ts +366 -0
- package/.cache/typescript/5.3/node_modules/@types/node/stream.d.ts +1701 -0
- package/.cache/typescript/5.3/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/.cache/typescript/5.3/node_modules/@types/node/test.d.ts +1465 -0
- package/.cache/typescript/5.3/node_modules/@types/node/timers/promises.d.ts +93 -0
- package/.cache/typescript/5.3/node_modules/@types/node/timers.d.ts +240 -0
- package/.cache/typescript/5.3/node_modules/@types/node/tls.d.ts +1210 -0
- package/.cache/typescript/5.3/node_modules/@types/node/trace_events.d.ts +182 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/assert.d.ts +996 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/async_hooks.d.ts +539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/buffer.d.ts +2362 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/child_process.d.ts +1540 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/cluster.d.ts +432 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/console.d.ts +415 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/constants.d.ts +19 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/crypto.d.ts +4487 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dgram.d.ts +596 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +545 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dns/promises.d.ts +425 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dns.d.ts +809 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/dom-events.d.ts +122 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/events.d.ts +879 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/fs/promises.d.ts +1239 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/fs.d.ts +4311 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/globals.d.ts +411 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/http.d.ts +1887 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/http2.d.ts +2382 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/https.d.ts +550 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/inspector.d.ts +2747 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/module.d.ts +315 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/net.d.ts +949 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/os.d.ts +478 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/perf_hooks.d.ts +645 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/process.d.ts +1561 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/querystring.d.ts +141 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/readline/promises.d.ts +150 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/readline.d.ts +539 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/repl.d.ts +430 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream/promises.d.ts +83 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream/web.d.ts +366 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/stream.d.ts +1701 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/test.d.ts +1465 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/timers.d.ts +240 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/tls.d.ts +1210 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/url.d.ts +927 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/util.d.ts +2183 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/vm.d.ts +903 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/wasi.d.ts +179 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/worker_threads.d.ts +691 -0
- package/.cache/typescript/5.3/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/.cache/typescript/5.3/node_modules/@types/node/tty.d.ts +208 -0
- package/.cache/typescript/5.3/node_modules/@types/node/url.d.ts +927 -0
- package/.cache/typescript/5.3/node_modules/@types/node/util.d.ts +2183 -0
- package/.cache/typescript/5.3/node_modules/@types/node/v8.d.ts +635 -0
- package/.cache/typescript/5.3/node_modules/@types/node/vm.d.ts +903 -0
- package/.cache/typescript/5.3/node_modules/@types/node/wasi.d.ts +179 -0
- package/.cache/typescript/5.3/node_modules/@types/node/worker_threads.d.ts +691 -0
- package/.cache/typescript/5.3/node_modules/@types/node/zlib.d.ts +517 -0
- package/.cache/typescript/5.3/node_modules/@types/npmlog/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/npmlog/README.md +15 -0
- package/.cache/typescript/5.3/node_modules/@types/npmlog/index.d.ts +84 -0
- package/.cache/typescript/5.3/node_modules/@types/npmlog/package.json +32 -0
- package/.cache/typescript/5.3/node_modules/@types/request/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/request/README.md +15 -0
- package/.cache/typescript/5.3/node_modules/@types/request/index.d.ts +395 -0
- package/.cache/typescript/5.3/node_modules/@types/request/package.json +70 -0
- package/.cache/typescript/5.3/node_modules/@types/tough-cookie/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/@types/tough-cookie/README.md +15 -0
- package/.cache/typescript/5.3/node_modules/@types/tough-cookie/index.d.ts +321 -0
- package/.cache/typescript/5.3/node_modules/@types/tough-cookie/package.json +35 -0
- package/.cache/typescript/5.3/node_modules/asynckit/LICENSE +21 -0
- package/.cache/typescript/5.3/node_modules/asynckit/README.md +233 -0
- package/.cache/typescript/5.3/node_modules/asynckit/bench.js +76 -0
- package/.cache/typescript/5.3/node_modules/asynckit/index.js +6 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/abort.js +29 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/async.js +34 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/defer.js +26 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/iterate.js +75 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_asynckit.js +91 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_parallel.js +25 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_serial.js +25 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/state.js +37 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/streamify.js +141 -0
- package/.cache/typescript/5.3/node_modules/asynckit/lib/terminator.js +29 -0
- package/.cache/typescript/5.3/node_modules/asynckit/package.json +63 -0
- package/.cache/typescript/5.3/node_modules/asynckit/parallel.js +43 -0
- package/.cache/typescript/5.3/node_modules/asynckit/serial.js +17 -0
- package/.cache/typescript/5.3/node_modules/asynckit/serialOrdered.js +75 -0
- package/.cache/typescript/5.3/node_modules/asynckit/stream.js +21 -0
- package/.cache/typescript/5.3/node_modules/combined-stream/License +19 -0
- package/.cache/typescript/5.3/node_modules/combined-stream/Readme.md +138 -0
- package/.cache/typescript/5.3/node_modules/combined-stream/lib/combined_stream.js +208 -0
- package/.cache/typescript/5.3/node_modules/combined-stream/package.json +25 -0
- package/.cache/typescript/5.3/node_modules/combined-stream/yarn.lock +17 -0
- package/.cache/typescript/5.3/node_modules/delayed-stream/License +19 -0
- package/.cache/typescript/5.3/node_modules/delayed-stream/Makefile +7 -0
- package/.cache/typescript/5.3/node_modules/delayed-stream/Readme.md +141 -0
- package/.cache/typescript/5.3/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
- package/.cache/typescript/5.3/node_modules/delayed-stream/package.json +27 -0
- package/.cache/typescript/5.3/node_modules/form-data/License +19 -0
- package/.cache/typescript/5.3/node_modules/form-data/README.md +350 -0
- package/.cache/typescript/5.3/node_modules/form-data/README.md.bak +350 -0
- package/.cache/typescript/5.3/node_modules/form-data/index.d.ts +51 -0
- package/.cache/typescript/5.3/node_modules/form-data/lib/browser.js +2 -0
- package/.cache/typescript/5.3/node_modules/form-data/lib/form_data.js +483 -0
- package/.cache/typescript/5.3/node_modules/form-data/lib/populate.js +10 -0
- package/.cache/typescript/5.3/node_modules/form-data/package.json +68 -0
- package/.cache/typescript/5.3/node_modules/mime-db/HISTORY.md +507 -0
- package/.cache/typescript/5.3/node_modules/mime-db/LICENSE +23 -0
- package/.cache/typescript/5.3/node_modules/mime-db/README.md +100 -0
- package/.cache/typescript/5.3/node_modules/mime-db/db.json +8519 -0
- package/.cache/typescript/5.3/node_modules/mime-db/index.js +12 -0
- package/.cache/typescript/5.3/node_modules/mime-db/package.json +60 -0
- package/.cache/typescript/5.3/node_modules/mime-types/HISTORY.md +397 -0
- package/.cache/typescript/5.3/node_modules/mime-types/LICENSE +23 -0
- package/.cache/typescript/5.3/node_modules/mime-types/README.md +113 -0
- package/.cache/typescript/5.3/node_modules/mime-types/index.js +188 -0
- package/.cache/typescript/5.3/node_modules/mime-types/package.json +44 -0
- package/.cache/typescript/5.3/node_modules/types-registry/README.md +2 -0
- package/.cache/typescript/5.3/node_modules/types-registry/index.json +1 -0
- package/.cache/typescript/5.3/node_modules/types-registry/package.json +20 -0
- package/.cache/typescript/5.3/node_modules/undici-types/README.md +6 -0
- package/.cache/typescript/5.3/node_modules/undici-types/agent.d.ts +31 -0
- package/.cache/typescript/5.3/node_modules/undici-types/api.d.ts +43 -0
- package/.cache/typescript/5.3/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/.cache/typescript/5.3/node_modules/undici-types/cache.d.ts +36 -0
- package/.cache/typescript/5.3/node_modules/undici-types/client.d.ts +97 -0
- package/.cache/typescript/5.3/node_modules/undici-types/connector.d.ts +34 -0
- package/.cache/typescript/5.3/node_modules/undici-types/content-type.d.ts +21 -0
- package/.cache/typescript/5.3/node_modules/undici-types/cookies.d.ts +28 -0
- package/.cache/typescript/5.3/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/.cache/typescript/5.3/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/.cache/typescript/5.3/node_modules/undici-types/errors.d.ts +128 -0
- package/.cache/typescript/5.3/node_modules/undici-types/fetch.d.ts +209 -0
- package/.cache/typescript/5.3/node_modules/undici-types/file.d.ts +39 -0
- package/.cache/typescript/5.3/node_modules/undici-types/filereader.d.ts +54 -0
- package/.cache/typescript/5.3/node_modules/undici-types/formdata.d.ts +108 -0
- package/.cache/typescript/5.3/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/.cache/typescript/5.3/node_modules/undici-types/global-origin.d.ts +7 -0
- package/.cache/typescript/5.3/node_modules/undici-types/handlers.d.ts +9 -0
- package/.cache/typescript/5.3/node_modules/undici-types/header.d.ts +4 -0
- package/.cache/typescript/5.3/node_modules/undici-types/index.d.ts +63 -0
- package/.cache/typescript/5.3/node_modules/undici-types/interceptors.d.ts +5 -0
- package/.cache/typescript/5.3/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/.cache/typescript/5.3/node_modules/undici-types/mock-client.d.ts +25 -0
- package/.cache/typescript/5.3/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/.cache/typescript/5.3/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/.cache/typescript/5.3/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/.cache/typescript/5.3/node_modules/undici-types/package.json +55 -0
- package/.cache/typescript/5.3/node_modules/undici-types/patch.d.ts +71 -0
- package/.cache/typescript/5.3/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/.cache/typescript/5.3/node_modules/undici-types/pool.d.ts +28 -0
- package/.cache/typescript/5.3/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/.cache/typescript/5.3/node_modules/undici-types/readable.d.ts +61 -0
- package/.cache/typescript/5.3/node_modules/undici-types/webidl.d.ts +220 -0
- package/.cache/typescript/5.3/node_modules/undici-types/websocket.d.ts +131 -0
- package/.cache/typescript/5.3/package-lock.json +149 -0
- package/.cache/typescript/5.3/package.json +1 -0
- package/.replit +1 -0
- package/index.js +2 -0
- package/leiamnash/edit.js +59 -0
- package/leiamnash/token.js +112 -0
- package/package.json +1 -1
- package/utils.js +18 -2
- package/.cache/replit/__replit_disk_meta.json +0 -1
- package/replit.nix +0 -6
@@ -0,0 +1,539 @@
|
|
1
|
+
/**
|
2
|
+
* The `node:readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time.
|
3
|
+
*
|
4
|
+
* To use the promise-based APIs:
|
5
|
+
*
|
6
|
+
* ```js
|
7
|
+
* import * as readline from 'node:readline/promises';
|
8
|
+
* ```
|
9
|
+
*
|
10
|
+
* To use the callback and sync APIs:
|
11
|
+
*
|
12
|
+
* ```js
|
13
|
+
* import * as readline from 'node:readline';
|
14
|
+
* ```
|
15
|
+
*
|
16
|
+
* The following simple example illustrates the basic use of the `node:readline`module.
|
17
|
+
*
|
18
|
+
* ```js
|
19
|
+
* import * as readline from 'node:readline/promises';
|
20
|
+
* import { stdin as input, stdout as output } from 'node:process';
|
21
|
+
*
|
22
|
+
* const rl = readline.createInterface({ input, output });
|
23
|
+
*
|
24
|
+
* const answer = await rl.question('What do you think of Node.js? ');
|
25
|
+
*
|
26
|
+
* console.log(`Thank you for your valuable feedback: ${answer}`);
|
27
|
+
*
|
28
|
+
* rl.close();
|
29
|
+
* ```
|
30
|
+
*
|
31
|
+
* Once this code is invoked, the Node.js application will not terminate until the`readline.Interface` is closed because the interface waits for data to be
|
32
|
+
* received on the `input` stream.
|
33
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/readline.js)
|
34
|
+
*/
|
35
|
+
declare module "readline" {
|
36
|
+
import { Abortable, EventEmitter } from "node:events";
|
37
|
+
import * as promises from "node:readline/promises";
|
38
|
+
export { promises };
|
39
|
+
export interface Key {
|
40
|
+
sequence?: string | undefined;
|
41
|
+
name?: string | undefined;
|
42
|
+
ctrl?: boolean | undefined;
|
43
|
+
meta?: boolean | undefined;
|
44
|
+
shift?: boolean | undefined;
|
45
|
+
}
|
46
|
+
/**
|
47
|
+
* Instances of the `readline.Interface` class are constructed using the`readline.createInterface()` method. Every instance is associated with a
|
48
|
+
* single `input` `Readable` stream and a single `output` `Writable` stream.
|
49
|
+
* The `output` stream is used to print prompts for user input that arrives on,
|
50
|
+
* and is read from, the `input` stream.
|
51
|
+
* @since v0.1.104
|
52
|
+
*/
|
53
|
+
export class Interface extends EventEmitter {
|
54
|
+
readonly terminal: boolean;
|
55
|
+
/**
|
56
|
+
* The current input data being processed by node.
|
57
|
+
*
|
58
|
+
* This can be used when collecting input from a TTY stream to retrieve the
|
59
|
+
* current value that has been processed thus far, prior to the `line` event
|
60
|
+
* being emitted. Once the `line` event has been emitted, this property will
|
61
|
+
* be an empty string.
|
62
|
+
*
|
63
|
+
* Be aware that modifying the value during the instance runtime may have
|
64
|
+
* unintended consequences if `rl.cursor` is not also controlled.
|
65
|
+
*
|
66
|
+
* **If not using a TTY stream for input, use the `'line'` event.**
|
67
|
+
*
|
68
|
+
* One possible use case would be as follows:
|
69
|
+
*
|
70
|
+
* ```js
|
71
|
+
* const values = ['lorem ipsum', 'dolor sit amet'];
|
72
|
+
* const rl = readline.createInterface(process.stdin);
|
73
|
+
* const showResults = debounce(() => {
|
74
|
+
* console.log(
|
75
|
+
* '\n',
|
76
|
+
* values.filter((val) => val.startsWith(rl.line)).join(' '),
|
77
|
+
* );
|
78
|
+
* }, 300);
|
79
|
+
* process.stdin.on('keypress', (c, k) => {
|
80
|
+
* showResults();
|
81
|
+
* });
|
82
|
+
* ```
|
83
|
+
* @since v0.1.98
|
84
|
+
*/
|
85
|
+
readonly line: string;
|
86
|
+
/**
|
87
|
+
* The cursor position relative to `rl.line`.
|
88
|
+
*
|
89
|
+
* This will track where the current cursor lands in the input string, when
|
90
|
+
* reading input from a TTY stream. The position of cursor determines the
|
91
|
+
* portion of the input string that will be modified as input is processed,
|
92
|
+
* as well as the column where the terminal caret will be rendered.
|
93
|
+
* @since v0.1.98
|
94
|
+
*/
|
95
|
+
readonly cursor: number;
|
96
|
+
/**
|
97
|
+
* NOTE: According to the documentation:
|
98
|
+
*
|
99
|
+
* > Instances of the `readline.Interface` class are constructed using the
|
100
|
+
* > `readline.createInterface()` method.
|
101
|
+
*
|
102
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#class-interfaceconstructor
|
103
|
+
*/
|
104
|
+
protected constructor(
|
105
|
+
input: NodeJS.ReadableStream,
|
106
|
+
output?: NodeJS.WritableStream,
|
107
|
+
completer?: Completer | AsyncCompleter,
|
108
|
+
terminal?: boolean,
|
109
|
+
);
|
110
|
+
/**
|
111
|
+
* NOTE: According to the documentation:
|
112
|
+
*
|
113
|
+
* > Instances of the `readline.Interface` class are constructed using the
|
114
|
+
* > `readline.createInterface()` method.
|
115
|
+
*
|
116
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#class-interfaceconstructor
|
117
|
+
*/
|
118
|
+
protected constructor(options: ReadLineOptions);
|
119
|
+
/**
|
120
|
+
* The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`.
|
121
|
+
* @since v15.3.0, v14.17.0
|
122
|
+
* @return the current prompt string
|
123
|
+
*/
|
124
|
+
getPrompt(): string;
|
125
|
+
/**
|
126
|
+
* The `rl.setPrompt()` method sets the prompt that will be written to `output`whenever `rl.prompt()` is called.
|
127
|
+
* @since v0.1.98
|
128
|
+
*/
|
129
|
+
setPrompt(prompt: string): void;
|
130
|
+
/**
|
131
|
+
* The `rl.prompt()` method writes the `Interface` instances configured`prompt` to a new line in `output` in order to provide a user with a new
|
132
|
+
* location at which to provide input.
|
133
|
+
*
|
134
|
+
* When called, `rl.prompt()` will resume the `input` stream if it has been
|
135
|
+
* paused.
|
136
|
+
*
|
137
|
+
* If the `Interface` was created with `output` set to `null` or`undefined` the prompt is not written.
|
138
|
+
* @since v0.1.98
|
139
|
+
* @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`.
|
140
|
+
*/
|
141
|
+
prompt(preserveCursor?: boolean): void;
|
142
|
+
/**
|
143
|
+
* The `rl.question()` method displays the `query` by writing it to the `output`,
|
144
|
+
* waits for user input to be provided on `input`, then invokes the `callback`function passing the provided input as the first argument.
|
145
|
+
*
|
146
|
+
* When called, `rl.question()` will resume the `input` stream if it has been
|
147
|
+
* paused.
|
148
|
+
*
|
149
|
+
* If the `Interface` was created with `output` set to `null` or`undefined` the `query` is not written.
|
150
|
+
*
|
151
|
+
* The `callback` function passed to `rl.question()` does not follow the typical
|
152
|
+
* pattern of accepting an `Error` object or `null` as the first argument.
|
153
|
+
* The `callback` is called with the provided answer as the only argument.
|
154
|
+
*
|
155
|
+
* An error will be thrown if calling `rl.question()` after `rl.close()`.
|
156
|
+
*
|
157
|
+
* Example usage:
|
158
|
+
*
|
159
|
+
* ```js
|
160
|
+
* rl.question('What is your favorite food? ', (answer) => {
|
161
|
+
* console.log(`Oh, so your favorite food is ${answer}`);
|
162
|
+
* });
|
163
|
+
* ```
|
164
|
+
*
|
165
|
+
* Using an `AbortController` to cancel a question.
|
166
|
+
*
|
167
|
+
* ```js
|
168
|
+
* const ac = new AbortController();
|
169
|
+
* const signal = ac.signal;
|
170
|
+
*
|
171
|
+
* rl.question('What is your favorite food? ', { signal }, (answer) => {
|
172
|
+
* console.log(`Oh, so your favorite food is ${answer}`);
|
173
|
+
* });
|
174
|
+
*
|
175
|
+
* signal.addEventListener('abort', () => {
|
176
|
+
* console.log('The food question timed out');
|
177
|
+
* }, { once: true });
|
178
|
+
*
|
179
|
+
* setTimeout(() => ac.abort(), 10000);
|
180
|
+
* ```
|
181
|
+
* @since v0.3.3
|
182
|
+
* @param query A statement or query to write to `output`, prepended to the prompt.
|
183
|
+
* @param callback A callback function that is invoked with the user's input in response to the `query`.
|
184
|
+
*/
|
185
|
+
question(query: string, callback: (answer: string) => void): void;
|
186
|
+
question(query: string, options: Abortable, callback: (answer: string) => void): void;
|
187
|
+
/**
|
188
|
+
* The `rl.pause()` method pauses the `input` stream, allowing it to be resumed
|
189
|
+
* later if necessary.
|
190
|
+
*
|
191
|
+
* Calling `rl.pause()` does not immediately pause other events (including`'line'`) from being emitted by the `Interface` instance.
|
192
|
+
* @since v0.3.4
|
193
|
+
*/
|
194
|
+
pause(): this;
|
195
|
+
/**
|
196
|
+
* The `rl.resume()` method resumes the `input` stream if it has been paused.
|
197
|
+
* @since v0.3.4
|
198
|
+
*/
|
199
|
+
resume(): this;
|
200
|
+
/**
|
201
|
+
* The `rl.close()` method closes the `Interface` instance and
|
202
|
+
* relinquishes control over the `input` and `output` streams. When called,
|
203
|
+
* the `'close'` event will be emitted.
|
204
|
+
*
|
205
|
+
* Calling `rl.close()` does not immediately stop other events (including `'line'`)
|
206
|
+
* from being emitted by the `Interface` instance.
|
207
|
+
* @since v0.1.98
|
208
|
+
*/
|
209
|
+
close(): void;
|
210
|
+
/**
|
211
|
+
* The `rl.write()` method will write either `data` or a key sequence identified
|
212
|
+
* by `key` to the `output`. The `key` argument is supported only if `output` is
|
213
|
+
* a `TTY` text terminal. See `TTY keybindings` for a list of key
|
214
|
+
* combinations.
|
215
|
+
*
|
216
|
+
* If `key` is specified, `data` is ignored.
|
217
|
+
*
|
218
|
+
* When called, `rl.write()` will resume the `input` stream if it has been
|
219
|
+
* paused.
|
220
|
+
*
|
221
|
+
* If the `Interface` was created with `output` set to `null` or`undefined` the `data` and `key` are not written.
|
222
|
+
*
|
223
|
+
* ```js
|
224
|
+
* rl.write('Delete this!');
|
225
|
+
* // Simulate Ctrl+U to delete the line written previously
|
226
|
+
* rl.write(null, { ctrl: true, name: 'u' });
|
227
|
+
* ```
|
228
|
+
*
|
229
|
+
* The `rl.write()` method will write the data to the `readline` `Interface`'s`input`_as if it were provided by the user_.
|
230
|
+
* @since v0.1.98
|
231
|
+
*/
|
232
|
+
write(data: string | Buffer, key?: Key): void;
|
233
|
+
write(data: undefined | null | string | Buffer, key: Key): void;
|
234
|
+
/**
|
235
|
+
* Returns the real position of the cursor in relation to the input
|
236
|
+
* prompt + string. Long input (wrapping) strings, as well as multiple
|
237
|
+
* line prompts are included in the calculations.
|
238
|
+
* @since v13.5.0, v12.16.0
|
239
|
+
*/
|
240
|
+
getCursorPos(): CursorPos;
|
241
|
+
/**
|
242
|
+
* events.EventEmitter
|
243
|
+
* 1. close
|
244
|
+
* 2. line
|
245
|
+
* 3. pause
|
246
|
+
* 4. resume
|
247
|
+
* 5. SIGCONT
|
248
|
+
* 6. SIGINT
|
249
|
+
* 7. SIGTSTP
|
250
|
+
* 8. history
|
251
|
+
*/
|
252
|
+
addListener(event: string, listener: (...args: any[]) => void): this;
|
253
|
+
addListener(event: "close", listener: () => void): this;
|
254
|
+
addListener(event: "line", listener: (input: string) => void): this;
|
255
|
+
addListener(event: "pause", listener: () => void): this;
|
256
|
+
addListener(event: "resume", listener: () => void): this;
|
257
|
+
addListener(event: "SIGCONT", listener: () => void): this;
|
258
|
+
addListener(event: "SIGINT", listener: () => void): this;
|
259
|
+
addListener(event: "SIGTSTP", listener: () => void): this;
|
260
|
+
addListener(event: "history", listener: (history: string[]) => void): this;
|
261
|
+
emit(event: string | symbol, ...args: any[]): boolean;
|
262
|
+
emit(event: "close"): boolean;
|
263
|
+
emit(event: "line", input: string): boolean;
|
264
|
+
emit(event: "pause"): boolean;
|
265
|
+
emit(event: "resume"): boolean;
|
266
|
+
emit(event: "SIGCONT"): boolean;
|
267
|
+
emit(event: "SIGINT"): boolean;
|
268
|
+
emit(event: "SIGTSTP"): boolean;
|
269
|
+
emit(event: "history", history: string[]): boolean;
|
270
|
+
on(event: string, listener: (...args: any[]) => void): this;
|
271
|
+
on(event: "close", listener: () => void): this;
|
272
|
+
on(event: "line", listener: (input: string) => void): this;
|
273
|
+
on(event: "pause", listener: () => void): this;
|
274
|
+
on(event: "resume", listener: () => void): this;
|
275
|
+
on(event: "SIGCONT", listener: () => void): this;
|
276
|
+
on(event: "SIGINT", listener: () => void): this;
|
277
|
+
on(event: "SIGTSTP", listener: () => void): this;
|
278
|
+
on(event: "history", listener: (history: string[]) => void): this;
|
279
|
+
once(event: string, listener: (...args: any[]) => void): this;
|
280
|
+
once(event: "close", listener: () => void): this;
|
281
|
+
once(event: "line", listener: (input: string) => void): this;
|
282
|
+
once(event: "pause", listener: () => void): this;
|
283
|
+
once(event: "resume", listener: () => void): this;
|
284
|
+
once(event: "SIGCONT", listener: () => void): this;
|
285
|
+
once(event: "SIGINT", listener: () => void): this;
|
286
|
+
once(event: "SIGTSTP", listener: () => void): this;
|
287
|
+
once(event: "history", listener: (history: string[]) => void): this;
|
288
|
+
prependListener(event: string, listener: (...args: any[]) => void): this;
|
289
|
+
prependListener(event: "close", listener: () => void): this;
|
290
|
+
prependListener(event: "line", listener: (input: string) => void): this;
|
291
|
+
prependListener(event: "pause", listener: () => void): this;
|
292
|
+
prependListener(event: "resume", listener: () => void): this;
|
293
|
+
prependListener(event: "SIGCONT", listener: () => void): this;
|
294
|
+
prependListener(event: "SIGINT", listener: () => void): this;
|
295
|
+
prependListener(event: "SIGTSTP", listener: () => void): this;
|
296
|
+
prependListener(event: "history", listener: (history: string[]) => void): this;
|
297
|
+
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
298
|
+
prependOnceListener(event: "close", listener: () => void): this;
|
299
|
+
prependOnceListener(event: "line", listener: (input: string) => void): this;
|
300
|
+
prependOnceListener(event: "pause", listener: () => void): this;
|
301
|
+
prependOnceListener(event: "resume", listener: () => void): this;
|
302
|
+
prependOnceListener(event: "SIGCONT", listener: () => void): this;
|
303
|
+
prependOnceListener(event: "SIGINT", listener: () => void): this;
|
304
|
+
prependOnceListener(event: "SIGTSTP", listener: () => void): this;
|
305
|
+
prependOnceListener(event: "history", listener: (history: string[]) => void): this;
|
306
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<string>;
|
307
|
+
}
|
308
|
+
export type ReadLine = Interface; // type forwarded for backwards compatibility
|
309
|
+
export type Completer = (line: string) => CompleterResult;
|
310
|
+
export type AsyncCompleter = (
|
311
|
+
line: string,
|
312
|
+
callback: (err?: null | Error, result?: CompleterResult) => void,
|
313
|
+
) => void;
|
314
|
+
export type CompleterResult = [string[], string];
|
315
|
+
export interface ReadLineOptions {
|
316
|
+
input: NodeJS.ReadableStream;
|
317
|
+
output?: NodeJS.WritableStream | undefined;
|
318
|
+
completer?: Completer | AsyncCompleter | undefined;
|
319
|
+
terminal?: boolean | undefined;
|
320
|
+
/**
|
321
|
+
* Initial list of history lines. This option makes sense
|
322
|
+
* only if `terminal` is set to `true` by the user or by an internal `output`
|
323
|
+
* check, otherwise the history caching mechanism is not initialized at all.
|
324
|
+
* @default []
|
325
|
+
*/
|
326
|
+
history?: string[] | undefined;
|
327
|
+
historySize?: number | undefined;
|
328
|
+
prompt?: string | undefined;
|
329
|
+
crlfDelay?: number | undefined;
|
330
|
+
/**
|
331
|
+
* If `true`, when a new input line added
|
332
|
+
* to the history list duplicates an older one, this removes the older line
|
333
|
+
* from the list.
|
334
|
+
* @default false
|
335
|
+
*/
|
336
|
+
removeHistoryDuplicates?: boolean | undefined;
|
337
|
+
escapeCodeTimeout?: number | undefined;
|
338
|
+
tabSize?: number | undefined;
|
339
|
+
}
|
340
|
+
/**
|
341
|
+
* The `readline.createInterface()` method creates a new `readline.Interface`instance.
|
342
|
+
*
|
343
|
+
* ```js
|
344
|
+
* const readline = require('node:readline');
|
345
|
+
* const rl = readline.createInterface({
|
346
|
+
* input: process.stdin,
|
347
|
+
* output: process.stdout,
|
348
|
+
* });
|
349
|
+
* ```
|
350
|
+
*
|
351
|
+
* Once the `readline.Interface` instance is created, the most common case is to
|
352
|
+
* listen for the `'line'` event:
|
353
|
+
*
|
354
|
+
* ```js
|
355
|
+
* rl.on('line', (line) => {
|
356
|
+
* console.log(`Received: ${line}`);
|
357
|
+
* });
|
358
|
+
* ```
|
359
|
+
*
|
360
|
+
* If `terminal` is `true` for this instance then the `output` stream will get
|
361
|
+
* the best compatibility if it defines an `output.columns` property and emits
|
362
|
+
* a `'resize'` event on the `output` if or when the columns ever change
|
363
|
+
* (`process.stdout` does this automatically when it is a TTY).
|
364
|
+
*
|
365
|
+
* When creating a `readline.Interface` using `stdin` as input, the program
|
366
|
+
* will not terminate until it receives an [EOF character](https://en.wikipedia.org/wiki/End-of-file#EOF_character). To exit without
|
367
|
+
* waiting for user input, call `process.stdin.unref()`.
|
368
|
+
* @since v0.1.98
|
369
|
+
*/
|
370
|
+
export function createInterface(
|
371
|
+
input: NodeJS.ReadableStream,
|
372
|
+
output?: NodeJS.WritableStream,
|
373
|
+
completer?: Completer | AsyncCompleter,
|
374
|
+
terminal?: boolean,
|
375
|
+
): Interface;
|
376
|
+
export function createInterface(options: ReadLineOptions): Interface;
|
377
|
+
/**
|
378
|
+
* The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input.
|
379
|
+
*
|
380
|
+
* Optionally, `interface` specifies a `readline.Interface` instance for which
|
381
|
+
* autocompletion is disabled when copy-pasted input is detected.
|
382
|
+
*
|
383
|
+
* If the `stream` is a `TTY`, then it must be in raw mode.
|
384
|
+
*
|
385
|
+
* This is automatically called by any readline instance on its `input` if the`input` is a terminal. Closing the `readline` instance does not stop
|
386
|
+
* the `input` from emitting `'keypress'` events.
|
387
|
+
*
|
388
|
+
* ```js
|
389
|
+
* readline.emitKeypressEvents(process.stdin);
|
390
|
+
* if (process.stdin.isTTY)
|
391
|
+
* process.stdin.setRawMode(true);
|
392
|
+
* ```
|
393
|
+
*
|
394
|
+
* ## Example: Tiny CLI
|
395
|
+
*
|
396
|
+
* The following example illustrates the use of `readline.Interface` class to
|
397
|
+
* implement a small command-line interface:
|
398
|
+
*
|
399
|
+
* ```js
|
400
|
+
* const readline = require('node:readline');
|
401
|
+
* const rl = readline.createInterface({
|
402
|
+
* input: process.stdin,
|
403
|
+
* output: process.stdout,
|
404
|
+
* prompt: 'OHAI> ',
|
405
|
+
* });
|
406
|
+
*
|
407
|
+
* rl.prompt();
|
408
|
+
*
|
409
|
+
* rl.on('line', (line) => {
|
410
|
+
* switch (line.trim()) {
|
411
|
+
* case 'hello':
|
412
|
+
* console.log('world!');
|
413
|
+
* break;
|
414
|
+
* default:
|
415
|
+
* console.log(`Say what? I might have heard '${line.trim()}'`);
|
416
|
+
* break;
|
417
|
+
* }
|
418
|
+
* rl.prompt();
|
419
|
+
* }).on('close', () => {
|
420
|
+
* console.log('Have a great day!');
|
421
|
+
* process.exit(0);
|
422
|
+
* });
|
423
|
+
* ```
|
424
|
+
*
|
425
|
+
* ## Example: Read file stream line-by-Line
|
426
|
+
*
|
427
|
+
* A common use case for `readline` is to consume an input file one line at a
|
428
|
+
* time. The easiest way to do so is leveraging the `fs.ReadStream` API as
|
429
|
+
* well as a `for await...of` loop:
|
430
|
+
*
|
431
|
+
* ```js
|
432
|
+
* const fs = require('node:fs');
|
433
|
+
* const readline = require('node:readline');
|
434
|
+
*
|
435
|
+
* async function processLineByLine() {
|
436
|
+
* const fileStream = fs.createReadStream('input.txt');
|
437
|
+
*
|
438
|
+
* const rl = readline.createInterface({
|
439
|
+
* input: fileStream,
|
440
|
+
* crlfDelay: Infinity,
|
441
|
+
* });
|
442
|
+
* // Note: we use the crlfDelay option to recognize all instances of CR LF
|
443
|
+
* // ('\r\n') in input.txt as a single line break.
|
444
|
+
*
|
445
|
+
* for await (const line of rl) {
|
446
|
+
* // Each line in input.txt will be successively available here as `line`.
|
447
|
+
* console.log(`Line from file: ${line}`);
|
448
|
+
* }
|
449
|
+
* }
|
450
|
+
*
|
451
|
+
* processLineByLine();
|
452
|
+
* ```
|
453
|
+
*
|
454
|
+
* Alternatively, one could use the `'line'` event:
|
455
|
+
*
|
456
|
+
* ```js
|
457
|
+
* const fs = require('node:fs');
|
458
|
+
* const readline = require('node:readline');
|
459
|
+
*
|
460
|
+
* const rl = readline.createInterface({
|
461
|
+
* input: fs.createReadStream('sample.txt'),
|
462
|
+
* crlfDelay: Infinity,
|
463
|
+
* });
|
464
|
+
*
|
465
|
+
* rl.on('line', (line) => {
|
466
|
+
* console.log(`Line from file: ${line}`);
|
467
|
+
* });
|
468
|
+
* ```
|
469
|
+
*
|
470
|
+
* Currently, `for await...of` loop can be a bit slower. If `async` / `await`flow and speed are both essential, a mixed approach can be applied:
|
471
|
+
*
|
472
|
+
* ```js
|
473
|
+
* const { once } = require('node:events');
|
474
|
+
* const { createReadStream } = require('node:fs');
|
475
|
+
* const { createInterface } = require('node:readline');
|
476
|
+
*
|
477
|
+
* (async function processLineByLine() {
|
478
|
+
* try {
|
479
|
+
* const rl = createInterface({
|
480
|
+
* input: createReadStream('big-file.txt'),
|
481
|
+
* crlfDelay: Infinity,
|
482
|
+
* });
|
483
|
+
*
|
484
|
+
* rl.on('line', (line) => {
|
485
|
+
* // Process the line.
|
486
|
+
* });
|
487
|
+
*
|
488
|
+
* await once(rl, 'close');
|
489
|
+
*
|
490
|
+
* console.log('File processed.');
|
491
|
+
* } catch (err) {
|
492
|
+
* console.error(err);
|
493
|
+
* }
|
494
|
+
* })();
|
495
|
+
* ```
|
496
|
+
* @since v0.7.7
|
497
|
+
*/
|
498
|
+
export function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
|
499
|
+
export type Direction = -1 | 0 | 1;
|
500
|
+
export interface CursorPos {
|
501
|
+
rows: number;
|
502
|
+
cols: number;
|
503
|
+
}
|
504
|
+
/**
|
505
|
+
* The `readline.clearLine()` method clears current line of given `TTY` stream
|
506
|
+
* in a specified direction identified by `dir`.
|
507
|
+
* @since v0.7.7
|
508
|
+
* @param callback Invoked once the operation completes.
|
509
|
+
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
510
|
+
*/
|
511
|
+
export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
|
512
|
+
/**
|
513
|
+
* The `readline.clearScreenDown()` method clears the given `TTY` stream from
|
514
|
+
* the current position of the cursor down.
|
515
|
+
* @since v0.7.7
|
516
|
+
* @param callback Invoked once the operation completes.
|
517
|
+
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
518
|
+
*/
|
519
|
+
export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
|
520
|
+
/**
|
521
|
+
* The `readline.cursorTo()` method moves cursor to the specified position in a
|
522
|
+
* given `TTY` `stream`.
|
523
|
+
* @since v0.7.7
|
524
|
+
* @param callback Invoked once the operation completes.
|
525
|
+
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
526
|
+
*/
|
527
|
+
export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
|
528
|
+
/**
|
529
|
+
* The `readline.moveCursor()` method moves the cursor _relative_ to its current
|
530
|
+
* position in a given `TTY` `stream`.
|
531
|
+
* @since v0.7.7
|
532
|
+
* @param callback Invoked once the operation completes.
|
533
|
+
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
534
|
+
*/
|
535
|
+
export function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
|
536
|
+
}
|
537
|
+
declare module "node:readline" {
|
538
|
+
export * from "readline";
|
539
|
+
}
|