import type { TimerOptions } from 'node:timers';
import type { HttpsProxyAgent } from 'https-proxy-agent';
export declare let platform: Platform;
export declare function set_platform(_platform: Platform): void;
interface Platform {
    /** 在 nodejs 环境中 */
    nodejs: boolean;
    /** 在 browser 环境中 */
    browser: boolean;
    get_buffer(length: number): Uint8Array;
    encode(str: string): Uint8Array;
    delay(milliseconds: number, options?: TimerOptions): Promise<void>;
    strip_ansi(str: string): string;
    /** 根据环境返回 ws 包的 WebSocket 或者浏览器全局的 WebSocket */
    get_websocket(): Promise<typeof WebSocket> | typeof WebSocket;
    /** (仅 nodejs 环境有) */
    get_https_proxy_agent?(): Promise<typeof HttpsProxyAgent>;
}
export {};
