aahook
Version:
A CLI tool that displays ASCII art when commands succeed or fail
70 lines • 1.5 kB
TypeScript
import { WriteStream } from 'tty';
/**
* Renderer class for terminal output control
* Handles ANSI escape sequences for animation rendering
*/
export declare class Renderer {
private stdout;
private isInteractive;
constructor(stdout?: WriteStream);
/**
* Hide terminal cursor
*/
hideCursor(): void;
/**
* Show terminal cursor
*/
showCursor(): void;
/**
* Clear current line
*/
clearLine(): void;
/**
* Clear screen from cursor position
*/
clearScreen(): void;
/**
* Move cursor to specific position
*/
moveCursor(x: number, y: number): void;
/**
* Move cursor up by n lines
*/
moveCursorUp(lines: number): void;
/**
* Move cursor down by n lines
*/
moveCursorDown(lines: number): void;
/**
* Save current cursor position
*/
savePosition(): void;
/**
* Restore saved cursor position
*/
restorePosition(): void;
/**
* Write content to stdout
*/
write(content: string): void;
/**
* Write content with newline
*/
writeLine(content: string): void;
/**
* Clean up and restore terminal state
*/
cleanup(): void;
/**
* Check if terminal supports animations
*/
supportsAnimation(): boolean;
/**
* Get terminal dimensions
*/
getTerminalSize(): {
columns: number;
rows: number;
};
}
//# sourceMappingURL=renderer.d.ts.map