import type { IWorkerIO } from './defs'; import type { IOutputCallback } from '../callback'; import { Termios } from '../termios'; export declare abstract class WorkerIO implements IWorkerIO { readonly outputCallback: IOutputCallback; readonly termios: Termios.Termios; constructor(outputCallback: IOutputCallback, termios: Termios.Termios); canEnable(): Promise; disable(): Promise; enable(): Promise; get enabled(): boolean; pollInput(timeoutMs: number): boolean; read(maxChars: number | null): number[]; readAsync(maxChars: number | null, timeoutMs: number): Promise; utf8ArrayToString(chars: Int8Array): string; write(text: string | Int8Array | number[]): void; protected _canReturnNow(): boolean; protected abstract _getStdin(timeoutMs: number): string; protected abstract _getStdinAsync(timeoutMs: number): Promise; protected _isLineBuffering(): boolean; protected _maybeEchoToOutput(chars: number[]): void; protected _postRead(chars: string): void; protected _processReadChars(chars: number[]): void; protected _processWriteChars(chars: Int8Array | number[]): number[]; /** * Extract and return up to maxChars from _readBuffer, or all characters if maxChars is null, * leaving the remainder in the buffer. * _readBuffer may or may not be empty when this is called. */ protected _readFromBuffer(maxChars: number | null): number[]; private _available?; protected _enabled: boolean; private _inAlternativeBuffer; private _utf8Decoder?; protected _writeColumn: number; protected _readBuffer: number[]; }