Something went wrong. Try again.
Ghostty for the web with xterm.js API compatibility
Something went wrong. Try again.
1.4 kB · 61 lines
TypeScript
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162/** * 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; // Optional: custom WASM path (auto-detected by default)}
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 type 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;}