/**
 * Node.js child_process module shim
 * Uses just-bash for command execution in browser with VirtualFS adapter
 */
import { EventEmitter } from './events';
import { Readable, Writable, Buffer } from './stream';
import type { VirtualFS } from '../virtual-fs';
/**
 * Initialize the child_process shim with a VirtualFS instance
 * Creates a single Bash instance with VirtualFSAdapter for efficient file access
 */
export declare function initChildProcess(vfs: VirtualFS): void;
export interface ExecOptions {
    cwd?: string;
    env?: Record<string, string>;
    encoding?: BufferEncoding | 'buffer';
    timeout?: number;
    maxBuffer?: number;
    shell?: string | boolean;
}
export interface ExecResult {
    stdout: string | Buffer;
    stderr: string | Buffer;
}
export type ExecCallback = (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void;
/**
 * Execute a command in a shell
 */
export declare function exec(command: string, optionsOrCallback?: ExecOptions | ExecCallback, callback?: ExecCallback): ChildProcess;
/**
 * Execute a command synchronously
 */
export declare function execSync(command: string, options?: ExecOptions): string | Buffer;
export interface SpawnOptions {
    cwd?: string;
    env?: Record<string, string>;
    shell?: boolean | string;
    stdio?: 'pipe' | 'inherit' | 'ignore' | Array<'pipe' | 'inherit' | 'ignore'>;
}
/**
 * Spawn a new process
 */
export declare function spawn(command: string, args?: string[] | SpawnOptions, options?: SpawnOptions): ChildProcess;
/**
 * Spawn a new process synchronously
 */
export declare function spawnSync(command: string, args?: string[], options?: SpawnOptions): {
    stdout: Buffer;
    stderr: Buffer;
    status: number;
    error?: Error;
};
/**
 * Execute a file
 */
export declare function execFile(file: string, args?: string[] | ExecOptions | ExecCallback, options?: ExecOptions | ExecCallback, callback?: ExecCallback): ChildProcess;
/**
 * Fork is not supported in browser
 */
export declare function fork(): never;
/**
 * ChildProcess class
 */
export declare class ChildProcess extends EventEmitter {
    pid: number;
    connected: boolean;
    killed: boolean;
    exitCode: number | null;
    signalCode: string | null;
    spawnargs: string[];
    spawnfile: string;
    stdin: Writable | null;
    stdout: Readable | null;
    stderr: Readable | null;
    constructor();
    kill(signal?: string): boolean;
    disconnect(): void;
    send(message: unknown, callback?: (error: Error | null) => void): boolean;
    ref(): this;
    unref(): this;
}
declare const _default: {
    exec: typeof exec;
    execSync: typeof execSync;
    execFile: typeof execFile;
    spawn: typeof spawn;
    spawnSync: typeof spawnSync;
    fork: typeof fork;
    ChildProcess: typeof ChildProcess;
    initChildProcess: typeof initChildProcess;
};
export default _default;
//# sourceMappingURL=child_process.d.ts.map