/**
 * Node.js process shim
 * Provides minimal process object for browser environment
 * Process is an EventEmitter in Node.js
 */
import { EventListener } from './events';
export interface ProcessEnv {
    [key: string]: string | undefined;
}
interface ProcessStream {
    isTTY: boolean;
    on: (event: string, listener: EventListener) => ProcessStream;
    once: (event: string, listener: EventListener) => ProcessStream;
    off: (event: string, listener: EventListener) => ProcessStream;
    emit: (event: string, ...args: unknown[]) => boolean;
    addListener: (event: string, listener: EventListener) => ProcessStream;
    removeListener: (event: string, listener: EventListener) => ProcessStream;
    removeAllListeners: (event?: string) => ProcessStream;
    setMaxListeners: (n: number) => ProcessStream;
    pause?: () => ProcessStream;
    resume?: () => ProcessStream;
    setEncoding?: (encoding: string) => ProcessStream;
}
interface ProcessWritableStream extends ProcessStream {
    write: (data: string | Buffer, encoding?: string, callback?: () => void) => boolean;
    end?: (data?: string, callback?: () => void) => void;
}
interface ProcessReadableStream extends ProcessStream {
    read?: (size?: number) => string | Buffer | null;
    setRawMode?: (mode: boolean) => ProcessReadableStream;
}
export interface Process {
    env: ProcessEnv;
    cwd: () => string;
    chdir: (directory: string) => void;
    platform: string;
    version: string;
    versions: {
        node: string;
        v8: string;
        uv: string;
    };
    argv: string[];
    argv0: string;
    execPath: string;
    execArgv: string[];
    pid: number;
    ppid: number;
    exit: (code?: number) => never;
    nextTick: (callback: (...args: unknown[]) => void, ...args: unknown[]) => void;
    stdout: ProcessWritableStream;
    stderr: ProcessWritableStream;
    stdin: ProcessReadableStream;
    hrtime: {
        (time?: [number, number]): [number, number];
        bigint: () => bigint;
    };
    memoryUsage: () => {
        rss: number;
        heapTotal: number;
        heapUsed: number;
        external: number;
        arrayBuffers: number;
    };
    uptime: () => number;
    cpuUsage: () => {
        user: number;
        system: number;
    };
    on: (event: string, listener: EventListener) => Process;
    once: (event: string, listener: EventListener) => Process;
    off: (event: string, listener: EventListener) => Process;
    emit: (event: string, ...args: unknown[]) => boolean;
    addListener: (event: string, listener: EventListener) => Process;
    removeListener: (event: string, listener: EventListener) => Process;
    removeAllListeners: (event?: string) => Process;
    listeners: (event: string) => EventListener[];
    listenerCount: (event: string) => number;
    prependListener: (event: string, listener: EventListener) => Process;
    prependOnceListener: (event: string, listener: EventListener) => Process;
    eventNames: () => string[];
    setMaxListeners: (n: number) => Process;
    getMaxListeners: () => number;
    _cwdCallCount?: number;
}
export declare function createProcess(options?: {
    cwd?: string;
    env?: ProcessEnv;
    onExit?: (code: number) => void;
}): Process;
export declare const process: Process;
export default process;
//# sourceMappingURL=process.d.ts.map