UNPKG

functionalscript

Version:

FunctionalScript is a purely functional subset of JavaScript

27 lines (26 loc) 990 B
export declare const backspace: string; type End = 'm'; type Csi = (code: number | string) => string; /** * Control Sequence Introducer (CSI) escape sequence. * https://en.wikipedia.org/wiki/ANSI_escape_code#Control_Sequence_Introducer_commands * * @param end - The final character that indicates the type of sequence. * @returns A function that takes a code (number or string) and returns the complete ANSI escape sequence. */ export declare const csi: (end: End) => Csi; /** * Specialization of CSI for Select Graphic Rendition (SGR) sequences. * https://en.wikipedia.org/wiki/ANSI_escape_code#SGR */ export declare const sgr: Csi; export declare const reset: string; export declare const bold: string; export declare const fgRed: string; export declare const fgGreen: string; export type Stdout = { readonly write: (s: string) => void; }; export type WriteText = (text: string) => WriteText; export declare const createConsoleText: (stdout: Stdout) => WriteText; export {};