///
import { EventEmitter } from 'events';
import { SimplexStream, TransformStreamDuplex } from './streams';
import { TtyProps } from './bits/tty';
import { SignalVector, ChildProcessQueue } from './bits/proc';
import { ExecCore, ExecCoreOptions } from './exec';
import { SharedVolume } from './services/shared-fs';
declare abstract class ProcessBase extends EventEmitter {
opts: ProcessStartupOptions;
stdin: TransformStreamDuplex;
stdout: TransformStreamDuplex;
stdin_raw: SimplexStream;
tty: TtyProps;
sigvec: SignalVector;
childq: ChildProcessQueue;
exited: boolean;
constructor(opts: ProcessStartupOptions);
abstract exec(wasm: string, argv?: string[]): void;
waitFor(): Promise;
reset(): void;
setupEncoder(): boolean;
}
/**
* Suitable for running a WASI process in a Web Worker or
* a Node.js worker thread.
*/
declare class WorkerProcess extends ProcessBase {
worker: Worker;
constructor(wasm: string, opts?: ProcessStartupOptions);
mountFs(volume: SharedVolume): this;
exec(wasm: string, argv?: string[]): void;
}
declare class BareProcess extends ProcessBase {
core: ExecCore;
constructor(wasm: string, opts?: ProcessStartupOptions);
exec(wasm: string, argv?: string[]): Promise;
}
declare type ProcessStartupOptions = ExecCoreOptions & {
argv?: string[];
};
export { ProcessBase, WorkerProcess, BareProcess, ProcessStartupOptions };