1 | # Installation
|
2 | > `npm install --save @types/mute-stream`
|
3 |
|
4 | # Summary
|
5 | This package contains type definitions for mute-stream (https://github.com/isaacs/mute-stream#readme).
|
6 |
|
7 | # Details
|
8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mute-stream.
|
9 | ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mute-stream/index.d.ts)
|
10 | ````ts
|
11 | // Type definitions for mute-stream 0.0
|
12 | // Project: https://github.com/isaacs/mute-stream#readme
|
13 | // Definitions by: Adam Jarret <https://github.com/adamjarret>
|
14 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
15 |
|
16 | /// <reference types="node" />
|
17 |
|
18 | import { Duplex } from 'stream';
|
19 |
|
20 | declare namespace MuteStream {
|
21 | interface Options {
|
22 | /**
|
23 | * Set to a string to replace each character with the specified string when muted.
|
24 | * (So you can show **** instead of the password, for example.)
|
25 | */
|
26 | replace?: string | undefined;
|
27 |
|
28 | /**
|
29 | * If you are using a replacement char, and also using a prompt with a readline stream
|
30 | * (as for a Password: ***** input), then specify what the prompt is so that backspace
|
31 | * will work properly. Otherwise, pressing backspace will overwrite the prompt with the
|
32 | * replacement character, which is weird.
|
33 | */
|
34 | prompt?: string | undefined;
|
35 | }
|
36 | }
|
37 |
|
38 | declare class MuteStream extends Duplex {
|
39 | constructor(options?: MuteStream.Options);
|
40 | mute: () => void;
|
41 | unmute: () => void;
|
42 | isTTY: boolean;
|
43 | }
|
44 |
|
45 | export = MuteStream;
|
46 |
|
47 | ````
|
48 |
|
49 | ### Additional Details
|
50 | * Last updated: Wed, 07 Jul 2021 00:01:45 GMT
|
51 | * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
|
52 | * Global values: none
|
53 |
|
54 | # Credits
|
55 | These definitions were written by [Adam Jarret](https://github.com/adamjarret).
|
56 |
|
\ | No newline at end of file |