import { BrsType } from "../brsTypes";
import type { TracePoint } from "../interpreter";
import type { Location } from "../lexer";
/**
 * Base error class for all BrightScript errors.
 * Extends JavaScript Error with location information and optional stack trace.
 */
export declare class BrsError extends Error {
    readonly location: Location;
    backTrace?: TracePoint[] | undefined;
    /**
     * Creates a BrsError with location and optional backtrace.
     * @param message - The error message
     * @param location - The source code location where the error occurred
     * @param backTrace - Optional array of trace points showing the call stack
     */
    constructor(message: string, location: Location, backTrace?: TracePoint[] | undefined);
    /**
     * Formats the error into a human-readable string including filename, starting and ending line
     * and column, and the message associated with the error, e.g.:
     *
     * `lorem.brs(1,1-3): Expected '(' after sub name`
     * @see BrsError#format
     */
    format(): string;
    /**
     * Formats a location and message into a human-readable string including filename, starting
     * and ending line and column, and the message associated with the error, e.g.:
     *
     * `lorem.brs(1,1-3): Expected '(' after sub name`
     *
     * @param message a string describing the error
     * @param location where the error occurred
     */
    static format(message: string, location: Location): string;
}
/**
 * Error thrown when a BrightScript runtime error is encountered.
 * Extends BrsError with error detail information and optional extra fields.
 */
export declare class RuntimeError extends BrsError {
    readonly errorDetail: ErrorDetail;
    readonly backTrace?: TracePoint[] | undefined;
    readonly extraFields?: Map<string, BrsType> | undefined;
    /**
     * Creates a RuntimeError with detailed error information.
     * @param errorDetail - Object containing errno and message
     * @param location - The source code location where the error occurred
     * @param backTrace - Optional array of trace points showing the call stack
     * @param extraFields - Optional map of additional error-specific fields
     */
    constructor(errorDetail: ErrorDetail, location: Location, backTrace?: TracePoint[] | undefined, extraFields?: Map<string, BrsType> | undefined);
}
/**
 * Error detail information matching the reference BrightScript implementation.
 * Contains a unique error number and human-readable message.
 */
export type ErrorDetail = {
    /** The unique ID of the error. */
    errno: number;
    /** The human-readable version */
    message: string;
};
/**
 * Function to find the error detail by the errno
 * @param errno number of the error code
 * @returns the error detail object
 */
export declare function findErrorDetail(errno: number): ErrorDetail | null;
/**
 * Comprehensive enumeration of all Roku BrightScript runtime error codes.
 * Each entry contains an errno (error number) and descriptive message.
 * Error codes match the reference BrightScript implementation.
 */
export declare const RuntimeErrorDetail: {
    NextWithoutFor: {
        errno: number;
        message: string;
    };
    BadSyntax: {
        message: string;
        errno: number;
    };
    ReturnedWithoutGosub: {
        message: string;
        errno: number;
    };
    OutOfData: {
        message: string;
        errno: number;
    };
    BadFunctionOrArrayParam: {
        message: string;
        errno: number;
    };
    OutOfMemory: {
        message: string;
        errno: number;
    };
    MissingLineNumber: {
        message: string;
        errno: number;
    };
    IndexOutOfBounds: {
        message: string;
        errno: number;
    };
    RedimensionArray: {
        message: string;
        errno: number;
    };
    DivideByZero: {
        message: string;
        errno: number;
    };
    TypeMismatch: {
        message: string;
        errno: number;
    };
    OutOfMemoryStringOp: {
        message: string;
        errno: number;
    };
    StringTooLong: {
        message: string;
        errno: number;
    };
    BadBitShift: {
        message: string;
        errno: number;
    };
    NoContinue: {
        message: string;
        errno: number;
    };
    OutOfRange: {
        message: string;
        errno: number;
    };
    ExecutionTimeout: {
        message: string;
        errno: number;
    };
    InvalidFormatSpecifier: {
        message: string;
        errno: number;
    };
    MalformedThrow: {
        message: string;
        errno: number;
    };
    UserDefined: {
        message: string;
        errno: number;
    };
    TooManyTasks: {
        message: string;
        errno: number;
    };
    RunNotSupported: {
        message: string;
        errno: number;
    };
    ContinueForWithoutFor: {
        message: string;
        errno: number;
    };
    ContinueWhileWithoutWhile: {
        message: string;
        errno: number;
    };
    TryContainsLabel: {
        message: string;
        errno: number;
    };
    EvalDisabled: {
        message: string;
        errno: number;
    };
    FunctionNotFound: {
        message: string;
        errno: number;
    };
    NameShadowsBuiltin: {
        message: string;
        errno: number;
    };
    VarShadowsFunctionName: {
        message: string;
        errno: number;
    };
    LabelLimitExceeded: {
        message: string;
        errno: number;
    };
    ClassNotFound: {
        message: string;
        errno: number;
    };
    InterfaceTooLarge: {
        message: string;
        errno: number;
    };
    NoInitializer: {
        message: string;
        errno: number;
    };
    ExitForWithoutFor: {
        message: string;
        errno: number;
    };
    Deprecated: {
        message: string;
        errno: number;
    };
    BadType: {
        message: string;
        errno: number;
    };
    MissingReturnType: {
        message: string;
        errno: number;
    };
    ReturnWithoutValue: {
        message: string;
        errno: number;
    };
    ReturnWithValue: {
        message: string;
        errno: number;
    };
    TypeMismatchForEachIndex: {
        message: string;
        errno: number;
    };
    MissingMainFunction: {
        message: string;
        errno: number;
    };
    DuplicateSub: {
        message: string;
        errno: number;
    };
    LimitExceeded: {
        message: string;
        errno: number;
    };
    ExitWhileWithoutWhile: {
        message: string;
        errno: number;
    };
    TooManyVariables: {
        message: string;
        errno: number;
    };
    TooManyConstants: {
        message: string;
        errno: number;
    };
    FunctionNotExpected: {
        message: string;
        errno: number;
    };
    UnterminatedString: {
        message: string;
        errno: number;
    };
    DuplicateLabel: {
        message: string;
        errno: number;
    };
    UnterminatedBlock: {
        message: string;
        errno: number;
    };
    BadNext: {
        message: string;
        errno: number;
    };
    EndOfFile: {
        message: string;
        errno: number;
    };
    CannotReadFile: {
        message: string;
        errno: number;
    };
    LineNumberSequenceError: {
        message: string;
        errno: number;
    };
    NoLineNumber: {
        message: string;
        errno: number;
    };
    IfWithoutEndIf: {
        message: string;
        errno: number;
    };
    WhileWithoutEndWhile: {
        message: string;
        errno: number;
    };
    EndWhileWithoutWhile: {
        message: string;
        errno: number;
    };
    ExceptionThrownOnStack: {
        message: string;
        errno: number;
    };
    StackOverflow: {
        message: string;
        errno: number;
    };
    NotAFunction: {
        message: string;
        errno: number;
    };
    UnsupportedUnicode: {
        message: string;
        errno: number;
    };
    ValueReturn: {
        message: string;
        errno: number;
    };
    BadNumberOfIndexes: {
        message: string;
        errno: number;
    };
    BadLHS: {
        message: string;
        errno: number;
    };
    MissingReturnValue: {
        message: string;
        errno: number;
    };
    UninitializedFunction: {
        message: string;
        errno: number;
    };
    UndimmedArray: {
        message: string;
        errno: number;
    };
    NonNumericArrayIndex: {
        message: string;
        errno: number;
    };
    UninitializedVariable: {
        message: string;
        errno: number;
    };
    TypelessOperation: {
        message: string;
        errno: number;
    };
    DotOnNonObject: {
        message: string;
        errno: number;
    };
    NonStaticInterfaceCall: {
        message: string;
        errno: number;
    };
    NotWaitable: {
        message: string;
        errno: number;
    };
    NotPrintable: {
        message: string;
        errno: number;
    };
    ReturnValueIgnored: {
        message: string;
        errno: number;
    };
    WrongNumberOfParams: {
        message: string;
        errno: number;
    };
    TooManyParams: {
        message: string;
        errno: number;
    };
    InterfaceNotAMember: {
        message: string;
        errno: number;
    };
    MemberFunctionNotFound: {
        message: string;
        errno: number;
    };
    RoWrongNumberOfParams: {
        message: string;
        errno: number;
    };
    ObjectClassNotFound: {
        message: string;
        errno: number;
    };
    Stop: {
        message: string;
        errno: number;
    };
    Break: {
        message: string;
        errno: number;
    };
    StackUnderflow: {
        message: string;
        errno: number;
    };
    MissingParenthesis: {
        message: string;
        errno: number;
    };
    UndefinedOperator: {
        message: string;
        errno: number;
    };
    NormalEnd: {
        message: string;
        errno: number;
    };
    UndefinedOpCode: {
        message: string;
        errno: number;
    };
    Internal: {
        message: string;
        errno: number;
    };
    Okay: {
        message: string;
        errno: number;
    };
};
/**
 * Logs a detected BRS error to the renderer process.
 * @param err the error to log
 */
export declare function logError(err: BrsError): void;
