import * as esb from 'esbuild';
export * from 'esbuild';
type BaseProps = {
    absWorkingDir: string;
};
export type BuildCodeProps = BaseProps & {
    code: string;
    outfile: string;
};
export type BuildEntrypointProps = BaseProps & {
    entrypoint: string;
};
export declare abstract class BuildContext<T> {
    private _context;
    private _previousProps;
    private _previousOpts;
    protected abstract _createContext(props: T, opts: esb.BuildOptions): Promise<esb.BuildContext>;
    rebuild(props: T, opts?: esb.BuildOptions): Promise<esb.BuildResult<esb.BuildOptions>>;
}
export declare class BuildCodeContext extends BuildContext<BuildCodeProps> {
    protected _createContext(props: BuildCodeProps, opts?: esb.BuildOptions): Promise<esb.BuildContext>;
}
export declare class BuildEntrypointContext extends BuildContext<BuildEntrypointProps> {
    protected _createContext(props: BuildEntrypointProps, opts?: esb.BuildOptions): Promise<esb.BuildContext>;
}
/**
 * Bundles a string of typescript code and writes the output to a file
 */
export declare function buildCode(props: BuildCodeProps, opts?: esb.BuildOptions): Promise<esb.BuildResult>;
/**
 * Bundles a typescript file and returns the output as a string
 */
export declare function buildEntrypoint(props: BuildEntrypointProps, opts?: esb.BuildOptions): Promise<esb.BuildResult & {
    outputFiles: esb.OutputFile[];
}>;
