import { ExecutionOptions, Interpreter } from "./interpreter";
import { AppExitReason, AppPayload, DeviceInfo, TaskPayload } from "./common";
import { Lexeme } from "./lexer";
import * as PP from "./preprocessor";
import * as BrsTypes from "./brsTypes";
export * from "./brsTypes";
export * from "./interpreter";
export * from "./error/BrsError";
export * from "./error/ArgumentMismatch";
export * from "./LexerParser";
export * from "./common";
export * from "./device/BrsDevice";
export * from "./brsTypes/components/RoFontRegistry";
export * from "./device/FileSystem";
export { default as SharedObject } from "./SharedObject";
export type { ISGNode } from "./extensions";
export { registerExtension, clearExtensions, instantiateExtensions, isSceneGraphNode } from "./extensions";
export { Lexer, Lexeme, Token, ReservedWords, isToken } from "./lexer";
export { Parser, Stmt, Expr, BlockEnd } from "./parser";
export * as stdlib from "./stdlib";
export * as netlib from "./interpreter/Network";
export { BrsTypes as types };
export { PP as preprocessor };
export { Preprocessor } from "./preprocessor/Preprocessor";
export { Interpreter } from "./interpreter";
export { Environment, Scope } from "./interpreter/Environment";
export { BrsDevice } from "./device/BrsDevice";
export { lexParseSync } from "./LexerParser";
export declare const bscs: Map<string, number>;
export declare const stats: Map<Lexeme, number>;
export declare const terminateReasons: string[];
/**
 * Support postMessage when not running as Worker.
 * @param messageCallback function that will receive and process the messages.
 * @returns void.
 */
declare global {
    function postMessage(message: any, options?: any): void;
}
/**
 * Setup the callback function to handle messages from interpreter
 * @param messageCallback callback function to handle messages from interpreter
 * @param sharedBuffer shared buffer to control the interpreter
 */
export declare function registerCallback(messageCallback: any, sharedBuffer?: SharedArrayBuffer): void;
/**
 * Returns a new instance of the Interpreter for REPL (Read-Eval-Print Loop).
 * @param payload Partial app payload with device configuration and assets
 * @returns Promise resolving to configured Interpreter instance or null on error
 */
export declare function getReplInterpreter(payload: Partial<AppPayload>): Promise<Interpreter | null>;
/**
 * Runs an arbitrary string of BrightScript code.
 * @param contents the BrightScript code to lex, parse and interpret.
 * @param interpreter an interpreter to use when executing `contents`. Required
 *                    for `repl` to have persistent state between user inputs.
 */
export declare function executeLine(contents: string, interpreter: Interpreter): void;
/**
 * Create the payload to run the app with the provided file map.
 * @param fileMap Map with file paths as keys and Blob content as values
 * @param customDeviceData optional object with device info data
 * @param deepLink optional map with deep link parameters
 *
 * @returns object with the payload to run the app.
 */
export declare function createPayloadFromFileMap(fileMap: Map<string, Blob>, customDeviceData?: Partial<DeviceInfo>, deepLink?: Map<string, string>): Promise<AppPayload>;
/**
 * Create the payload to run the app with the provided files.
 * @param files Code files to be executed
 * @param customDeviceData optional object with device info data
 * @param deepLink optional map with deep link parameters
 * @param root optional root path for the interpreter
 * @param ext optional path to external storage (directory or zip file)
 * @returns Promise resolving to AppPayload object to run the app
 */
export declare function createPayloadFromFiles(files: string[], customDeviceData?: Partial<DeviceInfo>, deepLink?: Map<string, string>, root?: string, ext?: string): Promise<AppPayload>;
/**
 * Runs a BrightScript app with full zip folder structure.
 * @param payload with the source code, manifest and all the assets of the app.
 * @param customOptions optional object with the output streams.
 *
 * @returns RunResult with the end reason and (optionally) the encrypted data.
 */
export declare function executeFile(payload: AppPayload, customOptions?: Partial<ExecutionOptions>): Promise<RunResult>;
/**
 * Executes a BrightScript Task in a separate worker context.
 * @param payload Task payload containing task configuration and source code
 * @param customOptions Optional execution options to override defaults
 */
export declare function executeTask(payload: TaskPayload, customOptions?: Partial<ExecutionOptions>): Promise<void>;
/**
 * Parse and Execute a set of BrightScript source code files.
 * @param interpreter an interpreter to use when executing the source code.
 * @param sourceMap Map with the source code files content.
 * @param payload with the source code, manifest and all the assets of the app.
 *
 * @returns RunResult with the end reason and (optionally) the encrypted data.
 */
export interface RunResult {
    exitReason: AppExitReason;
    cipherText?: Uint8Array;
    iv?: string;
}
