//#region src/index.d.ts export type TerminalSize = { columns: number; rows: number; }; export type TerminalExit = { code: number | null; signal: string | number | null; }; export type TerminalOutput = { sessionId: string; bytes: Uint8Array; }; export interface TerminalDuplex { output: AsyncIterable; write?(bytes: Uint8Array): Promise; resize?(size: TerminalSize): Promise; close(reason?: string): Promise; } export type LibterminalErrorCode = "invalid_frame" | "unsupported_protocol" | "invalid_terminal_size" | "subscriber_overflow" | "transport_closed" | "control_revoked" | "pty_unavailable" | "ghostty_unavailable"; export declare class LibterminalError extends Error { readonly code: LibterminalErrorCode; readonly cause?: unknown; constructor(code: LibterminalErrorCode, message: string, options?: { cause?: unknown; }); } export declare function assertTerminalSize(size: TerminalSize): TerminalSize; //#endregion