export declare namespace Termios { enum InputFlag { ISTRIP = 32,// Strip off 8th bit INLCR = 64,// Map NL to CR on input IGNCR = 128,// Ignore CR on input ICRNL = 256,// Map CR to NL on input IUCLC = 512,// Map uppercase to lowercase on input IXON = 1024,// Enable XON/XOFF flow control on output IXANY = 2048,// Enable any character to restart output IMAXBEL = 8192,// Ring bell when input queue is full IUTF8 = 16384 } enum OutputFlag { OPOST = 1,// Enable implementation-defined output processing OLCUC = 2,// Map lowercase to uppercase on output ONLCR = 4,// Map NL to CR-NL on output OCRNL = 8,// Map CR to NL on output ONOCR = 16,// Don't output CR at column 0 ONLRET = 32,// NL performs CR on output TABDLY = 6144 } enum LocalFlag { ISIG = 1,// Enable signals ICANON = 2,// Enable canonical mode on input ECHO = 8,// Enable echo ECHOE = 16,// ERASE character erases preceding character ECHOK = 32,// KILL character erases current line ECHONL = 64,// Echo NL even if ECHO not set NOFLSH = 128,// Disable flush after interrupt or quite ECHOCTL = 512,// Terminal special characters are echoed ECHOPRT = 1024,// Characters are printed as they are erased ECHOKE = 2048,// KILL is echoed by erasing each character on the line IEXTEN = 32768 } enum ControlCharacter { VINTR = 0,// INTR (interrupt) character VQUIT = 1,// QUIT character VERASE = 2,// ERASE character VKILL = 3,// KILL character VEOF = 4,// EOF (end-of-file) character VTIME = 5,// Timeout for non-canonical read VMIN = 6,// Minimum number of characters for non-canonical read VSWTCH = 7,// SWTCH (switch) character VSTART = 8,// Start character restarts output after stopped by Stop character VSTOP = 9,// Stop character to stop output until Start character typed VSUSP = 10,// SUSP (suspend) character VEOL = 11,// Additional EOL (end-of-line) character VREPRINT = 12,// Reprint unread characters VDISCARD = 13,// Toggle start/stop discards pending input VWERASE = 14,// Word erase VLNEXT = 15,// Literal next character VEOL2 = 16 } interface IFlags { c_iflag: InputFlag; c_oflag: OutputFlag; c_cflag: number; c_lflag: LocalFlag; c_cc: number[]; } function cloneFlags(flags: IFlags): IFlags; class Flags implements IFlags { c_iflag: InputFlag; c_oflag: OutputFlag; c_cflag: number; c_lflag: LocalFlag; c_cc: number[]; } interface ITermios { get(): IFlags; set(flags: IFlags): void; } class Termios implements ITermios { constructor(); get(): IFlags; log(title: string): void; set(flags: IFlags): void; setDefaultShell(): void; /** * Set termios settings to the default used in WebAssembly commands. */ setDefaultWasm(): void; setRawMode(): void; private _flags; } }