import type { ISize } from './callback'; import type { IShellWorker } from './defs_internal'; import type { IDriveFSOptions } from './drive_fs'; import { Termios } from './termios'; /** * Abstract base class for web worker running ShellImpl. * Implementation-specific code (comlink) is here to avoid polluting ShellImpl with it. */ export declare abstract class BaseShellWorker implements IShellWorker { initialize(options: IShellWorker.IOptions, callExternalCommand: IShellWorker.IProxyCallExternalCommand, callExternalTabComplete: IShellWorker.IProxyCallExternalTabComplete, downloadModuleCallback: IShellWorker.IProxyDownloadModuleCallback, enableBufferedStdinCallback: IShellWorker.IProxyEnableBufferedStdinCallback, outputCallback: IShellWorker.IProxyOutputCallback, setMainIOCallback: IShellWorker.IProxySetMainIOCallback, terminateCallback: IShellWorker.IProxyTerminateCallback, wasmUrlQueryParamsCallback?: IShellWorker.IProxyQueryParamsCallback): Promise; enableBufferedStdin(enable: boolean): Promise; get exitCode(): number; externalInput(maxChars: number | null): Promise; externalOutput(text: string, isStderr: boolean): void; externalSetTermios(flags: Termios.IFlags): void; /** * Initialize the DriveFS to mount an external file system. */ protected abstract initDriveFS(options: IDriveFSOptions): void; input(char: string): Promise; setSize(size: ISize): void; start(): Promise; themeChange(isDark?: boolean): Promise; private _setWorkerIO; private _shellImpl?; private _downloadModuleCallback?; private _enableBufferedStdinCallback?; private _terminateCallback?; private _stdinContext?; private _serviceWorkerWorkerIO?; private _sharedArrayBufferWorkerIO?; private _termios; private _workerIO?; }