import MagicString from 'magic-string';
import { Options, ICompiler, Context, CompilerOptions, TranspileOptions, CompileOptions, SourceFile, CompilerResult } from './types/build.js';
import { LogFn } from './types/config.js';
import '@deepkit/type';
import '@storm-software/config/types';
import '@storm-stack/types/shared/log';
import '@stryke/env/get-env-paths';
import '@stryke/env/types';
import '@stryke/types/base';
import '@stryke/types/configuration';
import '@stryke/types/package-json';
import '@stryke/types/tsconfig';
import 'hookable';
import 'jiti';
import 'typescript';
import 'unimport';
import '@storm-software/config-tools/types';

declare class Compiler<TOptions extends Options = Options> implements ICompiler<TOptions> {
    #private;
    /**
     * The logger function to use
     */
    protected log: LogFn;
    /**
     * The cache directory
     */
    protected cacheDir: string;
    constructor(context: Context<TOptions>, options?: CompilerOptions<TOptions>);
    /**
     * Transpile the module.
     *
     * @param context - The compiler context.
     * @param id - The name of the file to compile.
     * @param code - The source code to compile.
     * @returns The transpiled module.
     */
    transpile(context: Context<TOptions>, id: string, code: string | MagicString, options?: TranspileOptions<TOptions>): Promise<string>;
    /**
     * Compile the source code.
     *
     * @param context - The compiler context.
     * @param id - The name of the file to compile.
     * @param code - The source code to compile.
     * @returns The compiled source code and source map.
     */
    compile(context: Context<TOptions>, id: string, code: string | MagicString, options?: CompileOptions<TOptions>): Promise<string>;
    /**
     * Get the source file.
     *
     * @param id - The name of the file.
     * @param code - The source code.
     * @returns The source file.
     */
    getSourceFile(id: string, code?: string | MagicString): SourceFile;
    /**
     * Get the result of the compiler.
     *
     * @param sourceFile - The source file.
     * @param transpiled - The transpiled source code.
     * @returns The result of the compiler.
     */
    getResult(sourceFile: SourceFile, transpiled?: string): CompilerResult;
    protected getCache(context: Context<TOptions>, sourceFile: SourceFile): Promise<string | undefined>;
    protected setCache(context: Context<TOptions>, sourceFile: SourceFile, transpiled?: string): Promise<void>;
    /**
     * Transpile the module.
     *
     * @param context - The compiler context.
     * @param source - The compiler source file.
     * @param options - The transpile options.
     * @returns The transpiled module.
     */
    protected transpileModule(context: Context<TOptions>, source: SourceFile, options?: TranspileOptions<TOptions>): Promise<string>;
}

export { Compiler };
