@teaui/core
Version:
A high-level terminal UI library for Node
25 lines (24 loc) • 762 B
TypeScript
import type { Color } from './Color.js';
interface WritableProgram {
write(str: string): void;
onceRawData(fn: (...args: any[]) => void): void;
}
/**
* Sets iTerm2 proprietary ANSI codes
*/
export declare class iTerm2 {
static _restoreBg: string | undefined;
/**
* Returns a promise in case you really want to do flow control here, but it's not
* necessary; you can fire and forget this as part of `Screen.start()`
*
* @example
* Screen.start(async (program) => {
* await iTerm2.setBackground(program, [23, 23, 23])
* return new Box({ … })
* })
*/
static setBackground(program: WritableProgram, bg: Color): Promise<void>;
static restoreBg(program: WritableProgram): void;
}
export {};