import ts from 'typescript';
import { convertTSSourceFileToSC_Option } from './ts_to_sc_convert/file_conv.js';
import { GeneratorContext, TranspilerOption } from './context.js';
import { Result } from '../../util/Result.js';
import '../../cli/args.js';

declare class Generator {
    private program;
    private context;
    constructor({ compiler_program, context, transpiler_option }: Generator_Args);
    /**
     * Generate the SCLang result of inputted files.
     *
     * For now, all the files recorded in compiler program's `root_files_path` (`rootNames`)
     *  will be generated.
     *
     * @param output_path By default, current work directory.
     */
    generateAll(output_path?: string): Result<null, Error>;
    /**
     *
     * @throws `SourceFileNotFoundError` if the `name` cannot be used to get source file.
     */
    generateFile({ name, output_path, convertTSSourceFileToSC_option }: Generator_generateFile_Args): Result<null, Error>;
    getContext(): {
        compiler_program: ts.Program;
        transpiler_option: TranspilerOption;
        indent_level: number;
        class_info: {
            name: string;
            super_class_name: string;
        };
        is_generating_method: boolean;
        is_generating_constructor: boolean;
        is_generating_class_name: boolean;
        is_generating_member_of_object_literal: boolean;
        with_early_return: boolean;
        with_loop_interrupt: boolean | null;
        statement_label: string;
        is_nested_loop: boolean;
        break_means: "nothing" | "end_switch_case" | "stop_a_loop";
        super_means: "nothing" | "constructor" | "class_name" | "as_it_is";
        this_coming_from: "nothing" | "object_literal_parameter" | "built_instance" | "itself";
        expression_temporise_dict: Map<ts.Expression, string>;
        is_standalone_statement: boolean;
        indent: (level?: number) => GeneratorContext;
        outdent: (level?: number) => GeneratorContext;
        withClassInfo: (info: {
            name: string;
            super_class_name?: string;
        }) => GeneratorContext;
        atValuePosition: (value?: boolean) => GeneratorContext;
        isStandalongStatement: (value?: boolean) => GeneratorContext;
        willGenerateMethod: (value?: boolean) => GeneratorContext;
        willGenerateConstructor: (value?: boolean) => GeneratorContext;
        willGenerateClassName: (value?: boolean) => GeneratorContext;
        willGenerateMemberOfObjectLiteral: (value?: boolean) => GeneratorContext;
        withEarlyReturn: (value?: boolean) => GeneratorContext;
        withLoopInterrupt: (value?: boolean) => GeneratorContext;
        withStatementLabel: (value: string) => GeneratorContext;
        clearedStatementLabel: () => GeneratorContext;
        isNestedLoop: (value?: boolean) => GeneratorContext;
        makeBreakMeans: (value: GeneratorContext["break_means"]) => GeneratorContext;
        makeSuperMeans: (value: GeneratorContext["super_means"]) => GeneratorContext;
        makeThisComingFrom: (value: GeneratorContext["this_coming_from"]) => GeneratorContext;
        has_unhandled_self_indecr_operator: boolean;
    };
}
type Generator_Args = {
    compiler_program: ts.Program;
    context?: GeneratorContext;
    transpiler_option?: TranspilerOption;
};
type FileToWrite = {
    path: string;
    content: string;
};
type Generator_generateFile_Args = {
    /** The name (a path to file want to be transpiled) that passed to `rootNames` when creating `ts.Program`. */
    name: string;
    /**
     * The path of the generated output file.
     * If omitted, will be a path to a `.scd` file with same name in same directory.
     */
    output_path?: string;
    convertTSSourceFileToSC_option?: Partial<convertTSSourceFileToSC_Option>;
};

export { type FileToWrite, Generator };
