import { ExtractBySubKey, Values } from '../../../code/type/index.js';
import { CompileSwift, CompileRust, CompileC, BackendCompilationOutput, RustOutputFormat, CompileCpp, BuildFormatInputOutput } from '../../../code/type/cast.js';
export type CompileFormat = {
    swift: {
        input: 'swift';
        output: BackendCompilationOutput;
        extend: CompileSwift;
    };
    rust: {
        input: 'rust';
        output: RustOutputFormat;
        extend: CompileRust;
    };
    c: {
        input: 'c';
        output: BackendCompilationOutput;
        extend: CompileC;
    };
    cpp: {
        input: 'cpp';
        output: BackendCompilationOutput;
        extend: CompileCpp;
    };
};
export type CompileFormatList = Values<CompileFormat>;
export type CompileInputFormat = CompileFormatList['input'];
export type CompileOutputFormat<I extends CompileInputFormat> = ExtractBySubKey<CompileFormatList, I>;
export type Compile<I extends CompileInputFormat> = {
    input: {
        format: I;
    };
    output: {
        format: CompileOutputFormat<I>['output'];
    };
} & ('extend' extends keyof CompileOutputFormat<I> ? CompileOutputFormat<I>['extend'] : {});
export declare function compile<I extends CompileInputFormat>(source: Compile<I>): Promise<void>;
export declare function compileInternal(source: BuildFormatInputOutput): Promise<void>;
