import type { ISignal } from '@lumino/signaling'; import type { ISize } from './callback'; import type { IShell } from './defs'; import type { IExternalTabCompleteResult } from './external_command'; import type { Termios } from './termios'; /** * Abstract base class for Shell that external libraries use. * It communicates with the real shell that runs in a web worker. */ export declare abstract class BaseShell implements IShell { constructor(options: IShell.IOptions); /** * Load the web worker. */ protected abstract initWorker(options: IShell.IOptions): Worker; /** * Call an external command, i.e. one that runs in the browser UI thread. */ callExternalCommand(name: string, args: string[], environment: { [key: string]: string; }, stdinIsTerminal: boolean, stdoutIsTerminal: boolean, stderrIsTerminal: boolean, termiosFlags: Termios.IFlags): Promise<{ exitCode: number; environmentChanges?: { [key: string]: string | undefined; }; }>; /** * Call tab completion for an external command. */ callExternalTabComplete(name: string, args: string[]): Promise; dispose(): void; get disposed(): ISignal; downloadWasmModuleCallback(packageName: string, moduleName: string, start: boolean): void; exitCode(): Promise; get isDisposed(): boolean; private enableBufferedStdinCallback; input(char: string): Promise; /** * A promise that is fulfilled when the terminal is ready to be started. */ get ready(): Promise; /** * Set shell size. Overloaded to take an `ISize` object or `rows` and `columns`. * The former is the recommended approach, the latter was the original implementation and should * be considered deprecated for eventual removal. */ setSize(size: ISize): Promise; setSize(rows: number, columns: number): Promise; get shellId(): string; get size(): ISize; start(): Promise; themeChange(isDark?: boolean): Promise; private _initialize; private _initRemote; private _serviceWorkerHandleStdin; private _setMainIO; private _setSizeImpl; private _disposed; private _isDisposed; private _ready; private _shellId; private _size; private _worker?; private _remote?; private _externalCommands; private _serviceWorkerMainIO?; private _sharedArrayBufferMainIO?; private _mainIO?; private _downloadTracker?; private _outputCallback; }