/**
 * esbuild shim - Uses esbuild-wasm for transforms in the browser
 * Provides VFS integration for file access
 */
import type { VirtualFS } from '../virtual-fs';
export interface TransformOptions {
    loader?: 'js' | 'jsx' | 'ts' | 'tsx' | 'json' | 'css';
    format?: 'iife' | 'cjs' | 'esm';
    target?: string | string[];
    minify?: boolean;
    sourcemap?: boolean | 'inline' | 'external';
    jsx?: 'transform' | 'preserve';
    jsxFactory?: string;
    jsxFragment?: string;
}
export interface TransformResult {
    code: string;
    map: string;
    warnings: unknown[];
}
export interface BuildOptions {
    entryPoints?: string[];
    bundle?: boolean;
    outdir?: string;
    outfile?: string;
    format?: 'iife' | 'cjs' | 'esm';
    platform?: 'browser' | 'node' | 'neutral';
    target?: string | string[];
    minify?: boolean;
    sourcemap?: boolean | 'inline' | 'external';
    external?: string[];
    write?: boolean;
    plugins?: unknown[];
    absWorkingDir?: string;
}
export interface BuildResult {
    errors: unknown[];
    warnings: unknown[];
    outputFiles?: Array<{
        path: string;
        contents: Uint8Array;
        text: string;
    }>;
}
/**
 * Set the VirtualFS instance for file access
 */
export declare function setVFS(vfs: VirtualFS): void;
/**
 * Set the URL for the esbuild WASM file
 */
export declare function setWasmURL(url: string): void;
/**
 * Initialize esbuild-wasm
 * Must be called before using transform or build
 */
export declare function initialize(options?: {
    wasmURL?: string;
}): Promise<void>;
/**
 * Check if esbuild is initialized
 */
export declare function isInitialized(): boolean;
/**
 * Transform code using esbuild
 */
export declare function transform(code: string, options?: TransformOptions): Promise<TransformResult>;
/**
 * Transform code synchronously (requires prior initialization)
 */
export declare function transformSync(code: string, options?: TransformOptions): TransformResult;
/**
 * Transform ESM to CJS
 */
export declare function transformToCommonJS(code: string, options?: {
    loader?: TransformOptions['loader'];
}): Promise<string>;
/**
 * Build/bundle code (limited support in browser)
 */
export declare function build(options: BuildOptions): Promise<BuildResult>;
/**
 * Build synchronously (not supported in browser, throws error)
 */
export declare function buildSync(_options: BuildOptions): BuildResult;
/**
 * Get the esbuild version
 */
export declare function version(): string;
export declare function context(_options: BuildOptions): Promise<unknown>;
declare const _default: {
    initialize: typeof initialize;
    isInitialized: typeof isInitialized;
    transform: typeof transform;
    transformSync: typeof transformSync;
    transformToCommonJS: typeof transformToCommonJS;
    build: typeof build;
    buildSync: typeof buildSync;
    context: typeof context;
    version: typeof version;
    setWasmURL: typeof setWasmURL;
    setVFS: typeof setVFS;
};
export default _default;
//# sourceMappingURL=esbuild.d.ts.map