import { WorkerInstance } from '../types'; import { AbstractWorkerAdapter } from './base'; /** * Worker adapter for Bun environments. * * Supports: * - High-performance workers with Bun optimizations * - Nanosecond-precision timing * - Native garbage collection * - Module workers with ES module syntax * * @extends AbstractWorkerAdapter * * @example * ```typescript * const adapter = new BunWorkerAdapter(); * console.log(adapter.getBunVersion()); // "1.0.0" * console.log(adapter.nanoseconds()); // 1234567890123456 * ``` */ export declare class BunWorkerAdapter extends AbstractWorkerAdapter { readonly platform: "bun"; createWorker(script: string): Promise; isSupported(): boolean; /** * Returns the Bun version number. * * @returns Bun version or null if not available * * @example * ```typescript * const version = adapter.getBunVersion(); * console.log(version); // "1.0.0" * ``` */ getBunVersion(): string | null; /** * Returns the Bun git revision. * * @returns Bun revision or null if not available */ getBunRevision(): string | null; /** * Triggers garbage collection (Bun-specific feature). * * Useful for memory profiling or after memory-intensive operations. * * @param force - Forces immediate collection (default: false) * * @example * ```typescript * // After a large operation: * adapter.gc(true); * ``` */ gc(force?: boolean): void; /** * Returns the current time in nanoseconds. * * Higher precision than performance.now() for performance measurements. * * @returns Time in nanoseconds * * @example * ```typescript * const start = adapter.nanoseconds(); * // ... Operation ... * const duration = adapter.nanoseconds() - start; * console.log(`${duration / 1000000}ms`); * ``` */ nanoseconds(): number; } //# sourceMappingURL=bun.d.ts.map