1 | import type { WriteStream } from 'node:tty';
|
2 | type Log = (format?: any, ...params: any[]) => void;
|
3 | type IOStream = NodeJS.WritableStream & Pick<WriteStream, 'isTTY' | 'rows' | 'columns'> & Pick<Partial<WriteStream>, 'hasColors' | 'clearLine' | 'getColorDepth'>;
|
4 | export interface IConsole {
|
5 | readonly log: Log;
|
6 | readonly error: Log;
|
7 | readonly info: Log;
|
8 | readonly warn: Log;
|
9 | readonly stderrChannel: Channel;
|
10 | readonly stdoutChannel: Channel;
|
11 | }
|
12 | export declare const console: IConsole;
|
13 | export declare function log(...p: Parameters<typeof console.log>): void;
|
14 | export declare function error(...p: Parameters<typeof console.error>): void;
|
15 | export interface Channel {
|
16 | stream: IOStream;
|
17 | write: (msg: string) => void;
|
18 | writeLine: (msg: string) => void;
|
19 | clearLine: (dir: -1 | 0 | 1, callback?: () => void) => boolean;
|
20 | printLine: (format?: any, ...params: any[]) => void;
|
21 | getColorLevel: () => 0 | 1 | 2 | 3;
|
22 | }
|
23 | export declare function getColorLevel(stream: IOStream): 0 | 1 | 2 | 3;
|
24 | export {};
|
25 |
|
\ | No newline at end of file |