@holgerengels/compute-engine
Version:
Symbolic computing and numeric evaluations for JavaScript and Node.js
20 lines (19 loc) • 706 B
TypeScript
/* 0.26.0-alpha2 */
import { StyledBlock, StyledSpan } from './styled-text';
declare abstract class Terminal {
width: number | undefined;
indent: number;
constructor(options?: {
indent?: number;
width?: number;
});
renderBlock(block: StyledBlock): string;
abstract renderSpan(span: StyledSpan): string;
renderSpans(s: StyledSpan[]): string;
display(s: StyledSpan[] | StyledBlock): void;
}
export declare const terminal: Terminal;
/** Word-wrap a string that contains ANSI escape sequences.
* ANSI escape sequences do not add to the string length.
*/
export declare const wrapAnsiString: (string: string, width: number | undefined) => string[];
export {};