cdk-ecr-deployment 0.0.88 → 1.0.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.
- package/.gitattributes +23 -20
- package/.jsii +9 -8
- package/lib/index.js +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +7 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +9 -9
- package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +12 -10
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +17 -12
- package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +5 -5
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +62 -11
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +21 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +4 -5
- package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +11 -11
- package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +4 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +121 -14
- package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +3 -65
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +58 -18
- package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +4 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +7 -3
- package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +9 -9
- package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +12 -10
- package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +17 -12
- package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +5 -5
- package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +62 -11
- package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +21 -4
- package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +4 -5
- package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +11 -11
- package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +4 -4
- package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +121 -14
- package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +3 -65
- package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +58 -18
- package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +3 -3
- package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +3 -3
- package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +4 -4
- package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +7 -3
- package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +9 -9
- package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +12 -10
- package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +17 -12
- package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +5 -5
- package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +62 -11
- package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +21 -4
- package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +4 -5
- package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +11 -11
- package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +4 -4
- package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +121 -14
- package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +3 -65
- package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +58 -18
- package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +3 -3
- package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +3 -3
- package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +4 -4
- package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +1 -1
- package/package.json +21 -23
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* ```js
|
|
11
11
|
* const net = require('net');
|
|
12
12
|
* ```
|
|
13
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
13
|
+
* @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/net.js)
|
|
14
14
|
*/
|
|
15
15
|
declare module 'net' {
|
|
16
16
|
import * as stream from 'node:stream';
|
|
@@ -560,12 +560,12 @@ declare module 'net' {
|
|
|
560
560
|
* The `BlockList` object can be used with some network APIs to specify rules for
|
|
561
561
|
* disabling inbound or outbound access to specific IP addresses, IP ranges, or
|
|
562
562
|
* IP subnets.
|
|
563
|
-
* @since v15.0.0
|
|
563
|
+
* @since v15.0.0, v14.18.0
|
|
564
564
|
*/
|
|
565
565
|
class BlockList {
|
|
566
566
|
/**
|
|
567
567
|
* Adds a rule to block the given IP address.
|
|
568
|
-
* @since v15.0.0
|
|
568
|
+
* @since v15.0.0, v14.18.0
|
|
569
569
|
* @param address An IPv4 or IPv6 address.
|
|
570
570
|
* @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
|
|
571
571
|
*/
|
|
@@ -573,7 +573,7 @@ declare module 'net' {
|
|
|
573
573
|
addAddress(address: SocketAddress): void;
|
|
574
574
|
/**
|
|
575
575
|
* Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive).
|
|
576
|
-
* @since v15.0.0
|
|
576
|
+
* @since v15.0.0, v14.18.0
|
|
577
577
|
* @param start The starting IPv4 or IPv6 address in the range.
|
|
578
578
|
* @param end The ending IPv4 or IPv6 address in the range.
|
|
579
579
|
* @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
|
|
@@ -582,7 +582,7 @@ declare module 'net' {
|
|
|
582
582
|
addRange(start: SocketAddress, end: SocketAddress): void;
|
|
583
583
|
/**
|
|
584
584
|
* Adds a rule to block a range of IP addresses specified as a subnet mask.
|
|
585
|
-
* @since v15.0.0
|
|
585
|
+
* @since v15.0.0, v14.18.0
|
|
586
586
|
* @param net The network IPv4 or IPv6 address.
|
|
587
587
|
* @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`.
|
|
588
588
|
* @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
|
|
@@ -606,7 +606,7 @@ declare module 'net' {
|
|
|
606
606
|
* console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true
|
|
607
607
|
* console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true
|
|
608
608
|
* ```
|
|
609
|
-
* @since v15.0.0
|
|
609
|
+
* @since v15.0.0, v14.18.0
|
|
610
610
|
* @param address The IP address to check
|
|
611
611
|
* @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
|
|
612
612
|
*/
|
|
@@ -754,26 +754,26 @@ declare module 'net' {
|
|
|
754
754
|
port?: number | undefined;
|
|
755
755
|
}
|
|
756
756
|
/**
|
|
757
|
-
* @since v15.14.0
|
|
757
|
+
* @since v15.14.0, v14.18.0
|
|
758
758
|
*/
|
|
759
759
|
class SocketAddress {
|
|
760
760
|
constructor(options: SocketAddressInitOptions);
|
|
761
761
|
/**
|
|
762
762
|
* Either \`'ipv4'\` or \`'ipv6'\`.
|
|
763
|
-
* @since v15.14.0
|
|
763
|
+
* @since v15.14.0, v14.18.0
|
|
764
764
|
*/
|
|
765
765
|
readonly address: string;
|
|
766
766
|
/**
|
|
767
767
|
* Either \`'ipv4'\` or \`'ipv6'\`.
|
|
768
|
-
* @since v15.14.0
|
|
768
|
+
* @since v15.14.0, v14.18.0
|
|
769
769
|
*/
|
|
770
770
|
readonly family: IPVersion;
|
|
771
771
|
/**
|
|
772
|
-
* @since v15.14.0
|
|
772
|
+
* @since v15.14.0, v14.18.0
|
|
773
773
|
*/
|
|
774
774
|
readonly port: number;
|
|
775
775
|
/**
|
|
776
|
-
* @since v15.14.0
|
|
776
|
+
* @since v15.14.0, v14.18.0
|
|
777
777
|
*/
|
|
778
778
|
readonly flowlabel: number;
|
|
779
779
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -225,6 +225,6 @@
|
|
|
225
225
|
},
|
|
226
226
|
"scripts": {},
|
|
227
227
|
"dependencies": {},
|
|
228
|
-
"typesPublisherContentHash": "
|
|
228
|
+
"typesPublisherContentHash": "6a6a3a40242455c8b732c50c33bcbbd96f68ccf65d366fbd96a6773223877826",
|
|
229
229
|
"typeScriptVersion": "3.8"
|
|
230
230
|
}
|
|
@@ -13,7 +13,7 @@ declare module 'path/win32' {
|
|
|
13
13
|
* ```js
|
|
14
14
|
* const path = require('path');
|
|
15
15
|
* ```
|
|
16
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
16
|
+
* @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/path.js)
|
|
17
17
|
*/
|
|
18
18
|
declare module 'path' {
|
|
19
19
|
namespace path {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* performance.measure('A to B', 'A', 'B');
|
|
27
27
|
* });
|
|
28
28
|
* ```
|
|
29
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
29
|
+
* @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/perf_hooks.js)
|
|
30
30
|
*/
|
|
31
31
|
declare module 'perf_hooks' {
|
|
32
32
|
import { AsyncResource } from 'node:async_hooks';
|
|
@@ -485,7 +485,7 @@ declare module 'perf_hooks' {
|
|
|
485
485
|
}
|
|
486
486
|
interface RecordableHistogram extends Histogram {
|
|
487
487
|
/**
|
|
488
|
-
* @since v15.9.0
|
|
488
|
+
* @since v15.9.0, v14.18.0
|
|
489
489
|
* @param val The amount to record in the histogram.
|
|
490
490
|
*/
|
|
491
491
|
record(val: number | bigint): void;
|
|
@@ -494,7 +494,7 @@ declare module 'perf_hooks' {
|
|
|
494
494
|
* previous call to `recordDelta()` and records that amount in the histogram.
|
|
495
495
|
*
|
|
496
496
|
* ## Examples
|
|
497
|
-
* @since v15.9.0
|
|
497
|
+
* @since v15.9.0, v14.18.0
|
|
498
498
|
*/
|
|
499
499
|
recordDelta(): void;
|
|
500
500
|
}
|
|
@@ -546,7 +546,7 @@ declare module 'perf_hooks' {
|
|
|
546
546
|
}
|
|
547
547
|
/**
|
|
548
548
|
* Returns a `RecordableHistogram`.
|
|
549
|
-
* @since v15.9.0
|
|
549
|
+
* @since v15.9.0, v14.18.0
|
|
550
550
|
*/
|
|
551
551
|
function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
|
|
552
552
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* made available to developers as a convenience. Fixes or other modifications to
|
|
25
25
|
* the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project.
|
|
26
26
|
* @deprecated Since v7.0.0 - Deprecated
|
|
27
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
27
|
+
* @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/punycode.js)
|
|
28
28
|
*/
|
|
29
29
|
declare module 'punycode' {
|
|
30
30
|
/**
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* The `querystring` API is considered Legacy. While it is still maintained,
|
|
10
10
|
* new code should use the `URLSearchParams` API instead.
|
|
11
11
|
* @deprecated Legacy
|
|
12
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
12
|
+
* @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/querystring.js)
|
|
13
13
|
*/
|
|
14
14
|
declare module 'querystring' {
|
|
15
15
|
interface StringifyOptions {
|
|
@@ -1,32 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time.
|
|
3
|
-
*
|
|
2
|
+
* The `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:
|
|
4
5
|
*
|
|
5
6
|
* ```js
|
|
6
|
-
*
|
|
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';
|
|
7
14
|
* ```
|
|
8
15
|
*
|
|
9
16
|
* The following simple example illustrates the basic use of the `readline` module.
|
|
10
17
|
*
|
|
11
18
|
* ```js
|
|
12
|
-
*
|
|
19
|
+
* import * as readline from 'node:readline/promises';
|
|
20
|
+
* import { stdin as input, stdout as output } from 'process';
|
|
21
|
+
*
|
|
22
|
+
* const rl = readline.createInterface({ input, output });
|
|
13
23
|
*
|
|
14
|
-
* const
|
|
15
|
-
* input: process.stdin,
|
|
16
|
-
* output: process.stdout
|
|
17
|
-
* });
|
|
24
|
+
* const answer = await rl.question('What do you think of Node.js? ');
|
|
18
25
|
*
|
|
19
|
-
*
|
|
20
|
-
* // TODO: Log the answer in a database
|
|
21
|
-
* console.log(`Thank you for your valuable feedback: ${answer}`);
|
|
26
|
+
* console.log(`Thank you for your valuable feedback: ${answer}`);
|
|
22
27
|
*
|
|
23
|
-
*
|
|
24
|
-
* });
|
|
28
|
+
* rl.close();
|
|
25
29
|
* ```
|
|
26
30
|
*
|
|
27
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
|
|
28
32
|
* received on the `input` stream.
|
|
29
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
33
|
+
* @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/readline.js)
|
|
30
34
|
*/
|
|
31
35
|
declare module 'readline' {
|
|
32
36
|
import { Abortable, EventEmitter } from 'node:events';
|
|
@@ -394,6 +398,109 @@ declare module 'readline' {
|
|
|
394
398
|
* if (process.stdin.isTTY)
|
|
395
399
|
* process.stdin.setRawMode(true);
|
|
396
400
|
* ```
|
|
401
|
+
*
|
|
402
|
+
* ## Example: Tiny CLI
|
|
403
|
+
*
|
|
404
|
+
* The following example illustrates the use of `readline.Interface` class to
|
|
405
|
+
* implement a small command-line interface:
|
|
406
|
+
*
|
|
407
|
+
* ```js
|
|
408
|
+
* const readline = require('readline');
|
|
409
|
+
* const rl = readline.createInterface({
|
|
410
|
+
* input: process.stdin,
|
|
411
|
+
* output: process.stdout,
|
|
412
|
+
* prompt: 'OHAI> '
|
|
413
|
+
* });
|
|
414
|
+
*
|
|
415
|
+
* rl.prompt();
|
|
416
|
+
*
|
|
417
|
+
* rl.on('line', (line) => {
|
|
418
|
+
* switch (line.trim()) {
|
|
419
|
+
* case 'hello':
|
|
420
|
+
* console.log('world!');
|
|
421
|
+
* break;
|
|
422
|
+
* default:
|
|
423
|
+
* console.log(`Say what? I might have heard '${line.trim()}'`);
|
|
424
|
+
* break;
|
|
425
|
+
* }
|
|
426
|
+
* rl.prompt();
|
|
427
|
+
* }).on('close', () => {
|
|
428
|
+
* console.log('Have a great day!');
|
|
429
|
+
* process.exit(0);
|
|
430
|
+
* });
|
|
431
|
+
* ```
|
|
432
|
+
*
|
|
433
|
+
* ## Example: Read file stream line-by-Line
|
|
434
|
+
*
|
|
435
|
+
* A common use case for `readline` is to consume an input file one line at a
|
|
436
|
+
* time. The easiest way to do so is leveraging the `fs.ReadStream` API as
|
|
437
|
+
* well as a `for await...of` loop:
|
|
438
|
+
*
|
|
439
|
+
* ```js
|
|
440
|
+
* const fs = require('fs');
|
|
441
|
+
* const readline = require('readline');
|
|
442
|
+
*
|
|
443
|
+
* async function processLineByLine() {
|
|
444
|
+
* const fileStream = fs.createReadStream('input.txt');
|
|
445
|
+
*
|
|
446
|
+
* const rl = readline.createInterface({
|
|
447
|
+
* input: fileStream,
|
|
448
|
+
* crlfDelay: Infinity
|
|
449
|
+
* });
|
|
450
|
+
* // Note: we use the crlfDelay option to recognize all instances of CR LF
|
|
451
|
+
* // ('\r\n') in input.txt as a single line break.
|
|
452
|
+
*
|
|
453
|
+
* for await (const line of rl) {
|
|
454
|
+
* // Each line in input.txt will be successively available here as `line`.
|
|
455
|
+
* console.log(`Line from file: ${line}`);
|
|
456
|
+
* }
|
|
457
|
+
* }
|
|
458
|
+
*
|
|
459
|
+
* processLineByLine();
|
|
460
|
+
* ```
|
|
461
|
+
*
|
|
462
|
+
* Alternatively, one could use the `'line'` event:
|
|
463
|
+
*
|
|
464
|
+
* ```js
|
|
465
|
+
* const fs = require('fs');
|
|
466
|
+
* const readline = require('readline');
|
|
467
|
+
*
|
|
468
|
+
* const rl = readline.createInterface({
|
|
469
|
+
* input: fs.createReadStream('sample.txt'),
|
|
470
|
+
* crlfDelay: Infinity
|
|
471
|
+
* });
|
|
472
|
+
*
|
|
473
|
+
* rl.on('line', (line) => {
|
|
474
|
+
* console.log(`Line from file: ${line}`);
|
|
475
|
+
* });
|
|
476
|
+
* ```
|
|
477
|
+
*
|
|
478
|
+
* 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:
|
|
479
|
+
*
|
|
480
|
+
* ```js
|
|
481
|
+
* const { once } = require('events');
|
|
482
|
+
* const { createReadStream } = require('fs');
|
|
483
|
+
* const { createInterface } = require('readline');
|
|
484
|
+
*
|
|
485
|
+
* (async function processLineByLine() {
|
|
486
|
+
* try {
|
|
487
|
+
* const rl = createInterface({
|
|
488
|
+
* input: createReadStream('big-file.txt'),
|
|
489
|
+
* crlfDelay: Infinity
|
|
490
|
+
* });
|
|
491
|
+
*
|
|
492
|
+
* rl.on('line', (line) => {
|
|
493
|
+
* // Process the line.
|
|
494
|
+
* });
|
|
495
|
+
*
|
|
496
|
+
* await once(rl, 'close');
|
|
497
|
+
*
|
|
498
|
+
* console.log('File processed.');
|
|
499
|
+
* } catch (err) {
|
|
500
|
+
* console.error(err);
|
|
501
|
+
* }
|
|
502
|
+
* })();
|
|
503
|
+
* ```
|
|
397
504
|
* @since v0.7.7
|
|
398
505
|
*/
|
|
399
506
|
function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* ```js
|
|
7
7
|
* const repl = require('repl');
|
|
8
8
|
* ```
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/repl.js)
|
|
10
10
|
*/
|
|
11
11
|
declare module 'repl' {
|
|
12
12
|
import { Interface, Completer, AsyncCompleter } from 'node:readline';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
declare module 'stream/web' {
|
|
2
2
|
// stub module, pending copy&paste from .d.ts or manual impl
|
|
3
3
|
// copy from lib.dom.d.ts
|
|
4
|
-
|
|
5
4
|
interface ReadableWritablePair<R = any, W = any> {
|
|
6
5
|
readable: ReadableStream<R>;
|
|
7
6
|
/**
|
|
@@ -15,7 +14,6 @@ declare module 'stream/web' {
|
|
|
15
14
|
*/
|
|
16
15
|
writable: WritableStream<W>;
|
|
17
16
|
}
|
|
18
|
-
|
|
19
17
|
interface StreamPipeOptions {
|
|
20
18
|
preventAbort?: boolean;
|
|
21
19
|
preventCancel?: boolean;
|
|
@@ -63,70 +61,53 @@ declare module 'stream/web' {
|
|
|
63
61
|
preventClose?: boolean;
|
|
64
62
|
signal?: AbortSignal;
|
|
65
63
|
}
|
|
66
|
-
|
|
67
64
|
interface ReadableStreamGenericReader {
|
|
68
65
|
readonly closed: Promise<undefined>;
|
|
69
66
|
cancel(reason?: any): Promise<void>;
|
|
70
67
|
}
|
|
71
|
-
|
|
72
68
|
interface ReadableStreamDefaultReadValueResult<T> {
|
|
73
69
|
done: false;
|
|
74
70
|
value: T;
|
|
75
71
|
}
|
|
76
|
-
|
|
77
72
|
interface ReadableStreamDefaultReadDoneResult {
|
|
78
73
|
done: true;
|
|
79
74
|
value?: undefined;
|
|
80
75
|
}
|
|
81
76
|
type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
|
|
82
|
-
type ReadableStreamDefaultReadResult<T> =
|
|
83
|
-
| ReadableStreamDefaultReadValueResult<T>
|
|
84
|
-
| ReadableStreamDefaultReadDoneResult;
|
|
85
|
-
|
|
77
|
+
type ReadableStreamDefaultReadResult<T> = ReadableStreamDefaultReadValueResult<T> | ReadableStreamDefaultReadDoneResult;
|
|
86
78
|
interface ReadableByteStreamControllerCallback {
|
|
87
79
|
(controller: ReadableByteStreamController): void | PromiseLike<void>;
|
|
88
80
|
}
|
|
89
|
-
|
|
90
81
|
interface UnderlyingSinkAbortCallback {
|
|
91
82
|
(reason?: any): void | PromiseLike<void>;
|
|
92
83
|
}
|
|
93
|
-
|
|
94
84
|
interface UnderlyingSinkCloseCallback {
|
|
95
85
|
(): void | PromiseLike<void>;
|
|
96
86
|
}
|
|
97
|
-
|
|
98
87
|
interface UnderlyingSinkStartCallback {
|
|
99
88
|
(controller: WritableStreamDefaultController): any;
|
|
100
89
|
}
|
|
101
|
-
|
|
102
90
|
interface UnderlyingSinkWriteCallback<W> {
|
|
103
91
|
(chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
|
|
104
92
|
}
|
|
105
|
-
|
|
106
93
|
interface UnderlyingSourceCancelCallback {
|
|
107
94
|
(reason?: any): void | PromiseLike<void>;
|
|
108
95
|
}
|
|
109
|
-
|
|
110
96
|
interface UnderlyingSourcePullCallback<R> {
|
|
111
97
|
(controller: ReadableStreamController<R>): void | PromiseLike<void>;
|
|
112
98
|
}
|
|
113
|
-
|
|
114
99
|
interface UnderlyingSourceStartCallback<R> {
|
|
115
100
|
(controller: ReadableStreamController<R>): any;
|
|
116
101
|
}
|
|
117
|
-
|
|
118
102
|
interface TransformerFlushCallback<O> {
|
|
119
103
|
(controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
|
|
120
104
|
}
|
|
121
|
-
|
|
122
105
|
interface TransformerStartCallback<O> {
|
|
123
106
|
(controller: TransformStreamDefaultController<O>): any;
|
|
124
107
|
}
|
|
125
|
-
|
|
126
108
|
interface TransformerTransformCallback<I, O> {
|
|
127
109
|
(chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
|
|
128
110
|
}
|
|
129
|
-
|
|
130
111
|
interface UnderlyingByteSource {
|
|
131
112
|
autoAllocateChunkSize?: number;
|
|
132
113
|
cancel?: ReadableStreamErrorCallback;
|
|
@@ -134,14 +115,12 @@ declare module 'stream/web' {
|
|
|
134
115
|
start?: ReadableByteStreamControllerCallback;
|
|
135
116
|
type: 'bytes';
|
|
136
117
|
}
|
|
137
|
-
|
|
138
118
|
interface UnderlyingSource<R = any> {
|
|
139
119
|
cancel?: UnderlyingSourceCancelCallback;
|
|
140
120
|
pull?: UnderlyingSourcePullCallback<R>;
|
|
141
121
|
start?: UnderlyingSourceStartCallback<R>;
|
|
142
122
|
type?: undefined;
|
|
143
123
|
}
|
|
144
|
-
|
|
145
124
|
interface UnderlyingSink<W = any> {
|
|
146
125
|
abort?: UnderlyingSinkAbortCallback;
|
|
147
126
|
close?: UnderlyingSinkCloseCallback;
|
|
@@ -149,11 +128,9 @@ declare module 'stream/web' {
|
|
|
149
128
|
type?: undefined;
|
|
150
129
|
write?: UnderlyingSinkWriteCallback<W>;
|
|
151
130
|
}
|
|
152
|
-
|
|
153
131
|
interface ReadableStreamErrorCallback {
|
|
154
132
|
(reason: any): void | PromiseLike<void>;
|
|
155
133
|
}
|
|
156
|
-
|
|
157
134
|
/** This Streams API interface represents a readable stream of byte data. */
|
|
158
135
|
interface ReadableStream<R = any> {
|
|
159
136
|
readonly locked: boolean;
|
|
@@ -164,29 +141,21 @@ declare module 'stream/web' {
|
|
|
164
141
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
165
142
|
[Symbol.asyncIterator](options?: { preventCancel?: boolean }): AsyncIterableIterator<R>;
|
|
166
143
|
}
|
|
167
|
-
|
|
168
144
|
const ReadableStream: {
|
|
169
145
|
prototype: ReadableStream;
|
|
170
|
-
new (
|
|
171
|
-
underlyingSource: UnderlyingByteSource,
|
|
172
|
-
strategy?: QueuingStrategy<Uint8Array>,
|
|
173
|
-
): ReadableStream<Uint8Array>;
|
|
146
|
+
new (underlyingSource: UnderlyingByteSource, strategy?: QueuingStrategy<Uint8Array>): ReadableStream<Uint8Array>;
|
|
174
147
|
new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
|
|
175
148
|
};
|
|
176
|
-
|
|
177
149
|
interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
|
|
178
150
|
read(): Promise<ReadableStreamDefaultReadResult<R>>;
|
|
179
151
|
releaseLock(): void;
|
|
180
152
|
}
|
|
181
|
-
|
|
182
153
|
const ReadableStreamDefaultReader: {
|
|
183
154
|
prototype: ReadableStreamDefaultReader;
|
|
184
155
|
new <R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
|
|
185
156
|
};
|
|
186
|
-
|
|
187
157
|
const ReadableStreamBYOBReader: any;
|
|
188
158
|
const ReadableStreamBYOBRequest: any;
|
|
189
|
-
|
|
190
159
|
interface ReadableByteStreamController {
|
|
191
160
|
readonly byobRequest: undefined;
|
|
192
161
|
readonly desiredSize: number | null;
|
|
@@ -194,24 +163,20 @@ declare module 'stream/web' {
|
|
|
194
163
|
enqueue(chunk: ArrayBufferView): void;
|
|
195
164
|
error(error?: any): void;
|
|
196
165
|
}
|
|
197
|
-
|
|
198
166
|
const ReadableByteStreamController: {
|
|
199
167
|
prototype: ReadableByteStreamController;
|
|
200
168
|
new (): ReadableByteStreamController;
|
|
201
169
|
};
|
|
202
|
-
|
|
203
170
|
interface ReadableStreamDefaultController<R = any> {
|
|
204
171
|
readonly desiredSize: number | null;
|
|
205
172
|
close(): void;
|
|
206
173
|
enqueue(chunk?: R): void;
|
|
207
174
|
error(e?: any): void;
|
|
208
175
|
}
|
|
209
|
-
|
|
210
176
|
const ReadableStreamDefaultController: {
|
|
211
177
|
prototype: ReadableStreamDefaultController;
|
|
212
178
|
new (): ReadableStreamDefaultController;
|
|
213
179
|
};
|
|
214
|
-
|
|
215
180
|
interface Transformer<I = any, O = any> {
|
|
216
181
|
flush?: TransformerFlushCallback<O>;
|
|
217
182
|
readableType?: undefined;
|
|
@@ -219,33 +184,24 @@ declare module 'stream/web' {
|
|
|
219
184
|
transform?: TransformerTransformCallback<I, O>;
|
|
220
185
|
writableType?: undefined;
|
|
221
186
|
}
|
|
222
|
-
|
|
223
187
|
interface TransformStream<I = any, O = any> {
|
|
224
188
|
readonly readable: ReadableStream<O>;
|
|
225
189
|
readonly writable: WritableStream<I>;
|
|
226
190
|
}
|
|
227
|
-
|
|
228
191
|
const TransformStream: {
|
|
229
192
|
prototype: TransformStream;
|
|
230
|
-
new <I = any, O = any>(
|
|
231
|
-
transformer?: Transformer<I, O>,
|
|
232
|
-
writableStrategy?: QueuingStrategy<I>,
|
|
233
|
-
readableStrategy?: QueuingStrategy<O>,
|
|
234
|
-
): TransformStream<I, O>;
|
|
193
|
+
new <I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;
|
|
235
194
|
};
|
|
236
|
-
|
|
237
195
|
interface TransformStreamDefaultController<O = any> {
|
|
238
196
|
readonly desiredSize: number | null;
|
|
239
197
|
enqueue(chunk?: O): void;
|
|
240
198
|
error(reason?: any): void;
|
|
241
199
|
terminate(): void;
|
|
242
200
|
}
|
|
243
|
-
|
|
244
201
|
const TransformStreamDefaultController: {
|
|
245
202
|
prototype: TransformStreamDefaultController;
|
|
246
203
|
new (): TransformStreamDefaultController;
|
|
247
204
|
};
|
|
248
|
-
|
|
249
205
|
/**
|
|
250
206
|
* This Streams API interface provides a standard abstraction for writing
|
|
251
207
|
* streaming data to a destination, known as a sink. This object comes with
|
|
@@ -257,12 +213,10 @@ declare module 'stream/web' {
|
|
|
257
213
|
close(): Promise<void>;
|
|
258
214
|
getWriter(): WritableStreamDefaultWriter<W>;
|
|
259
215
|
}
|
|
260
|
-
|
|
261
216
|
const WritableStream: {
|
|
262
217
|
prototype: WritableStream;
|
|
263
218
|
new <W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
|
|
264
219
|
};
|
|
265
|
-
|
|
266
220
|
/**
|
|
267
221
|
* This Streams API interface is the object returned by
|
|
268
222
|
* WritableStream.getWriter() and once created locks the < writer to the
|
|
@@ -278,12 +232,10 @@ declare module 'stream/web' {
|
|
|
278
232
|
releaseLock(): void;
|
|
279
233
|
write(chunk?: W): Promise<void>;
|
|
280
234
|
}
|
|
281
|
-
|
|
282
235
|
const WritableStreamDefaultWriter: {
|
|
283
236
|
prototype: WritableStreamDefaultWriter;
|
|
284
237
|
new <W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
|
|
285
238
|
};
|
|
286
|
-
|
|
287
239
|
/**
|
|
288
240
|
* This Streams API interface represents a controller allowing control of a
|
|
289
241
|
* WritableStream's state. When constructing a WritableStream, the
|
|
@@ -293,21 +245,17 @@ declare module 'stream/web' {
|
|
|
293
245
|
interface WritableStreamDefaultController {
|
|
294
246
|
error(e?: any): void;
|
|
295
247
|
}
|
|
296
|
-
|
|
297
248
|
const WritableStreamDefaultController: {
|
|
298
249
|
prototype: WritableStreamDefaultController;
|
|
299
250
|
new (): WritableStreamDefaultController;
|
|
300
251
|
};
|
|
301
|
-
|
|
302
252
|
interface QueuingStrategy<T = any> {
|
|
303
253
|
highWaterMark?: number;
|
|
304
254
|
size?: QueuingStrategySize<T>;
|
|
305
255
|
}
|
|
306
|
-
|
|
307
256
|
interface QueuingStrategySize<T = any> {
|
|
308
257
|
(chunk?: T): number;
|
|
309
258
|
}
|
|
310
|
-
|
|
311
259
|
interface QueuingStrategyInit {
|
|
312
260
|
/**
|
|
313
261
|
* Creates a new ByteLengthQueuingStrategy with the provided high water
|
|
@@ -320,7 +268,6 @@ declare module 'stream/web' {
|
|
|
320
268
|
*/
|
|
321
269
|
highWaterMark: number;
|
|
322
270
|
}
|
|
323
|
-
|
|
324
271
|
/**
|
|
325
272
|
* This Streams API interface provides a built-in byte length queuing
|
|
326
273
|
* strategy that can be used when constructing streams.
|
|
@@ -329,12 +276,10 @@ declare module 'stream/web' {
|
|
|
329
276
|
readonly highWaterMark: number;
|
|
330
277
|
readonly size: QueuingStrategySize<ArrayBufferView>;
|
|
331
278
|
}
|
|
332
|
-
|
|
333
279
|
const ByteLengthQueuingStrategy: {
|
|
334
280
|
prototype: ByteLengthQueuingStrategy;
|
|
335
281
|
new (init: QueuingStrategyInit): ByteLengthQueuingStrategy;
|
|
336
282
|
};
|
|
337
|
-
|
|
338
283
|
/**
|
|
339
284
|
* This Streams API interface provides a built-in byte length queuing
|
|
340
285
|
* strategy that can be used when constructing streams.
|
|
@@ -343,12 +288,10 @@ declare module 'stream/web' {
|
|
|
343
288
|
readonly highWaterMark: number;
|
|
344
289
|
readonly size: QueuingStrategySize;
|
|
345
290
|
}
|
|
346
|
-
|
|
347
291
|
const CountQueuingStrategy: {
|
|
348
292
|
prototype: CountQueuingStrategy;
|
|
349
293
|
new (init: QueuingStrategyInit): CountQueuingStrategy;
|
|
350
294
|
};
|
|
351
|
-
|
|
352
295
|
interface TextEncoderStream {
|
|
353
296
|
/** Returns "utf-8". */
|
|
354
297
|
readonly encoding: 'utf-8';
|
|
@@ -356,19 +299,15 @@ declare module 'stream/web' {
|
|
|
356
299
|
readonly writable: WritableStream<string>;
|
|
357
300
|
readonly [Symbol.toStringTag]: string;
|
|
358
301
|
}
|
|
359
|
-
|
|
360
302
|
const TextEncoderStream: {
|
|
361
303
|
prototype: TextEncoderStream;
|
|
362
304
|
new (): TextEncoderStream;
|
|
363
305
|
};
|
|
364
|
-
|
|
365
306
|
interface TextDecoderOptions {
|
|
366
307
|
fatal?: boolean;
|
|
367
308
|
ignoreBOM?: boolean;
|
|
368
309
|
}
|
|
369
|
-
|
|
370
310
|
type BufferSource = ArrayBufferView | ArrayBuffer;
|
|
371
|
-
|
|
372
311
|
interface TextDecoderStream {
|
|
373
312
|
/** Returns encoding's name, lower cased. */
|
|
374
313
|
readonly encoding: string;
|
|
@@ -380,7 +319,6 @@ declare module 'stream/web' {
|
|
|
380
319
|
readonly writable: WritableStream<BufferSource>;
|
|
381
320
|
readonly [Symbol.toStringTag]: string;
|
|
382
321
|
}
|
|
383
|
-
|
|
384
322
|
const TextDecoderStream: {
|
|
385
323
|
prototype: TextDecoderStream;
|
|
386
324
|
new (label?: string, options?: TextDecoderOptions): TextDecoderStream;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* The `stream` module is useful for creating new types of stream instances. It is
|
|
16
16
|
* usually not necessary to use the `stream` module to consume streams.
|
|
17
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
17
|
+
* @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/stream.js)
|
|
18
18
|
*/
|
|
19
19
|
declare module 'stream' {
|
|
20
20
|
import { EventEmitter, Abortable } from 'node:events';
|
|
@@ -71,7 +71,7 @@ declare module 'stream' {
|
|
|
71
71
|
readable: boolean;
|
|
72
72
|
/**
|
|
73
73
|
* Returns whether `'data'` has been emitted.
|
|
74
|
-
* @since v16.7.0
|
|
74
|
+
* @since v16.7.0, v14.18.0
|
|
75
75
|
* @experimental
|
|
76
76
|
*/
|
|
77
77
|
readonly readableDidRead: boolean;
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* decoder.write(Buffer.from([0x82]));
|
|
37
37
|
* console.log(decoder.end(Buffer.from([0xAC])));
|
|
38
38
|
* ```
|
|
39
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
39
|
+
* @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/string_decoder.js)
|
|
40
40
|
*/
|
|
41
41
|
declare module 'string_decoder' {
|
|
42
42
|
class StringDecoder {
|