Something went wrong. Try again.
Ghostty for the web with xterm.js API compatibility
Something went wrong. Try again.
1.5 kB · 63 lines
TypeScript
at task6
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364/** * xterm.js-compatible interfaces */
export interface ITerminalOptions { cols?: number; // Default: 80 rows?: number; // Default: 24 cursorBlink?: boolean; // Default: false cursorStyle?: 'block' | 'underline' | 'bar'; theme?: ITheme; scrollback?: number; // Default: 1000 fontSize?: number; // Default: 15 fontFamily?: string; // Default: 'monospace' allowTransparency?: boolean; wasmPath?: string; // Default: '../ghostty-vt.wasm' (relative to examples/)}
export interface ITheme { foreground?: string; background?: string; cursor?: string; cursorAccent?: string; selectionBackground?: string; selectionForeground?: string; // ANSI colors (0-15) black?: string; red?: string; green?: string; yellow?: string; blue?: string; magenta?: string; cyan?: string; white?: string; brightBlack?: string; brightRed?: string; brightGreen?: string; brightYellow?: string; brightBlue?: string; brightMagenta?: string; brightCyan?: string; brightWhite?: string;}
export interface IDisposable { dispose(): void;}
export interface IEvent<T> { (listener: (arg: T) => void): IDisposable;}
export interface ITerminalAddon { activate(terminal: ITerminalCore): void; dispose(): void;}
export interface ITerminalCore { cols: number; rows: number; element?: HTMLElement; textarea?: HTMLTextAreaElement;}