import * as ts from "typescript";
import { Host, DevsDiagnostic } from "./format";
import { DebugInfo, LocalBuildConfig, ResolvedBuildConfig } from "@devicescript/interop";
export declare const JD_SERIAL_HEADER_SIZE = 16;
export declare const JD_SERIAL_MAX_PAYLOAD_SIZE = 236;
export declare const CMD_GET_REG = 4096;
export declare const CMD_SET_REG = 8192;
export declare const DEVS_FILE_PREFIX = "bytecode";
export declare const DEVS_BYTECODE_FILE: string;
export declare const DEVS_LIB_FILE: string;
export declare const DEVS_DBG_FILE: string;
export declare const DEVS_SIZES_FILE: string;
export declare const TSDOC_PART = "devsPart";
export declare const TSDOC_SERVICES = "devsServices";
export declare const TSDOC_START = "devsStart";
export declare const TSDOC_GPIO = "devsGPIO";
export declare const TSDOC_WHEN_USED = "devsWhenUsed";
export declare function idName(pat: Expr | ts.DeclarationName): string;
type Expr = ts.Expression | ts.TemplateLiteralLikeNode;
export interface CompileFlags {
    library?: boolean;
    allFunctions?: boolean;
    allPrototypes?: boolean;
    traceBuiltin?: boolean;
    traceProto?: boolean;
    testHarness?: boolean;
    traceAllFiles?: boolean;
    traceFiles?: boolean;
}
export declare const compileFlagHelp: Record<string, string>;
export declare function getSymTags(sym: ts.Symbol, pref?: string): Record<string, string>;
export interface CompilationResult {
    success: boolean;
    binary: Uint8Array;
    dbg: DebugInfo;
    usedFiles: string[];
    diagnostics: DevsDiagnostic[];
    config?: ResolvedBuildConfig;
    settings?: Record<string, Uint8Array>;
}
/**
 * Compiles the DeviceScript program.
 * @param code
 * @param opts
 * @returns
 */
export declare function compile(code: string, opts?: {
    mainFileName?: string;
    log?: (msg: string) => void;
    files?: Record<string, string | Uint8Array>;
    errors?: DevsDiagnostic[];
    config?: LocalBuildConfig;
    verifyBytecode?: (buf: Uint8Array) => void;
    flags?: CompileFlags;
}): CompilationResult;
export declare function compileWithHost(mainFileName: string, host: Host): CompilationResult;
export declare function testCompiler(mainFileName: string, host: Host): void;
export {};
//# sourceMappingURL=compiler.d.ts.map