1 |
|
2 | import { LogUpdate } from 'log-update';
|
3 | import { Colors } from './colors';
|
4 | import { TaskChain } from './tasks';
|
5 | export interface OutputStrategy {
|
6 | readonly stream: NodeJS.WritableStream;
|
7 | createTaskChain(): TaskChain;
|
8 | }
|
9 | export interface RedrawLine {
|
10 | redrawLine(msg?: string): void;
|
11 | }
|
12 | export interface StreamOutputStrategyOptions {
|
13 | readonly stream: NodeJS.WritableStream;
|
14 | readonly colors?: Colors;
|
15 | }
|
16 | export declare class StreamOutputStrategy implements OutputStrategy {
|
17 | readonly stream: NodeJS.WritableStream;
|
18 | protected readonly colors: Colors;
|
19 | constructor({ stream, colors }: StreamOutputStrategyOptions);
|
20 | createTaskChain(): TaskChain;
|
21 | }
|
22 | export interface LogUpdateOutputStrategyOptions {
|
23 | readonly stream?: NodeJS.WritableStream;
|
24 | readonly colors?: Colors;
|
25 | }
|
26 | export declare class LogUpdateOutputStrategy implements OutputStrategy, RedrawLine {
|
27 | readonly stream: NodeJS.WritableStream;
|
28 | protected readonly colors: Colors;
|
29 | protected readonly logUpdate: LogUpdate;
|
30 | constructor({ stream, colors }?: LogUpdateOutputStrategyOptions);
|
31 | redrawLine(msg?: string): void;
|
32 | createTaskChain(): TaskChain;
|
33 | }
|