@skitee3000/bun-pty
Version:
Cross-platform pseudoterminal (PTY) implementation for Bun with native performance
28 lines • 1.03 kB
TypeScript
import type { IPty, IPtyForkOptions, IExitEvent } from "./interfaces";
export declare const DEFAULT_COLS = 80;
export declare const DEFAULT_ROWS = 24;
export declare const DEFAULT_FILE = "sh";
export declare const DEFAULT_NAME = "xterm";
export declare class Terminal implements IPty {
private handle;
private _pid;
private _cols;
private _rows;
private readonly _name;
private _readLoop;
private _closing;
private readonly _onData;
private readonly _onExit;
constructor(file?: string, args?: string[], opts?: IPtyForkOptions);
get pid(): number;
get cols(): number;
get rows(): number;
get process(): string;
get onData(): (listener: (e: string) => void) => import("./interfaces").IDisposable;
get onExit(): (listener: (e: IExitEvent) => void) => import("./interfaces").IDisposable;
write(data: string): void;
resize(cols: number, rows: number): void;
kill(signal?: string): void;
private _startReadLoop;
}
//# sourceMappingURL=terminal.d.ts.map