/**
 * This file is refactored into TypeScript based on
 * https://github.com/preactjs/wmr/blob/master/src/lib/rollup-plugin-container.js
 */
import { Plugin } from '../plugin';
import { InputOptions, OutputOptions, ModuleInfo, ChangeEvent, PartialResolvedId, LoadResult, SourceDescription } from 'rollup';
import { FSWatcher } from 'chokidar';
import { ResolvedConfig } from '..';
export interface PluginContainerOptions {
    cwd?: string;
    output?: OutputOptions;
    modules?: Map<string, {
        info: ModuleInfo;
    }>;
    writeFile?: (name: string, source: string | Uint8Array) => void;
}
export interface PluginContainer {
    options: InputOptions;
    buildStart(options: InputOptions): Promise<void>;
    watchChange(id: string, event?: ChangeEvent): void;
    resolveImportMeta(id: string, property: string): void;
    resolveId(id: string, importer?: string, skip?: Plugin[]): Promise<PartialResolvedId | null>;
    transform(code: string, id: string, inMap?: SourceDescription['map']): Promise<SourceDescription | null>;
    load(id: string): Promise<LoadResult | null>;
    resolveFileUrl(referenceId: string): string | null;
    close(): Promise<void>;
}
export declare function createPluginContainer({ plugins, logger, root, build: { rollupOptions } }: ResolvedConfig, watcher?: FSWatcher): Promise<PluginContainer>;
