import { BrsComponent, BrsNumber, BrsType, RoBoolean, RoInvalid, RoString } from ".";
import { Boxable } from "./Boxing";
/** Set of values supported in BrightScript. */
export declare enum ValueKind {
    Interface = 0,
    Invalid = 1,
    Boolean = 2,
    String = 3,
    Int32 = 4,
    Int64 = 5,
    Float = 6,
    Double = 7,
    Callable = 8,
    Uninitialized = 9,
    Dynamic = 10,
    Void = 11,
    Object = 12
}
export declare namespace ValueKind {
    /**
     * Converts a `ValueKind` enum member to a human-readable string representation.
     * @returns a textual representation of the provided value kind.
     */
    function toString(kind: ValueKind, legacy?: boolean): string;
    /**
     * Fetches a `ValueKind` enum member by its string representation.
     * @param kind the string representation of a `ValueKind`
     * @returns the corresponding `ValueKind` if one exists, otherwise `undefined`.
     */
    function fromString(kind: string): ValueKind | undefined;
}
/**
 * Checks if the passed value implements the Comparable interface.
 * @param value BrightScript value to be checked
 * @returns True if value is comparable, false otherwise
 */
export declare function isComparable(value: BrsType | BrsComponent): value is BrsType & Comparable;
/** The base for all BrightScript types. */
export interface BrsValue {
    /**
     * Type differentiator for all BrightScript values. Used to allow comparisons of `.kind` to
     * produce valuable compile-time type inferences.
     */
    readonly kind: ValueKind;
    /**
     * Converts the current value to a human-readable string.
     * @param parent The (optional) BrightScript value that this value is being printed in the context of.
     * @returns A human-readable representation of this value.
     */
    toString(parent?: BrsType): string;
    /**
     * Determines whether or not this value is equal to some `other` value.
     * @param other The value to compare this value to.
     * @returns `true` if this value is strictly equal to the `other` value, otherwise `false`.
     */
    equalTo(other: BrsType): BrsBoolean;
}
/** The set of operations required for a BrightScript datatype to be compared to another. */
export interface Comparable {
    /**
     * Determines whether or not this value is less than some `other` value.
     * @param other The value to compare this value to.
     * @returns `true` if this value is less than the `other` value, otherwise `false`.
     */
    lessThan(other: BrsType): BrsBoolean;
    /**
     * Determines whether or not this value is greater than some `other` value.
     * @param other The value to compare this value to.
     * @returns `true` if this value is greater than the `other` value, otherwise `false`.
     */
    greaterThan(other: BrsType): BrsBoolean;
    /**
     * Returns the value to be used on comparisons
     * @returns the current value, the type will depend on the object
     */
    getValue(): any;
}
/** Internal representation of a string in BrightScript. */
export declare class BrsString implements BrsValue, Comparable, Boxable {
    readonly value: string;
    inArray: boolean;
    readonly kind = ValueKind.String;
    constructor(value: string, inArray?: boolean);
    /**
     * Compares if this string is less than another value.
     * @param other Value to compare against
     * @returns True if this string is lexicographically less than other, false otherwise
     */
    lessThan(other: BrsType): BrsBoolean;
    /**
     * Compares if this string is greater than another value.
     * @param other Value to compare against
     * @returns True if this string is lexicographically greater than other, false otherwise
     */
    greaterThan(other: BrsType): BrsBoolean;
    /**
     * Checks if this string is equal to another value.
     * @param other Value to compare against
     * @returns True if values are equal, false otherwise
     */
    equalTo(other: BrsType): BrsBoolean;
    /**
     * Gets the underlying string value.
     * @returns JavaScript string value
     */
    getValue(): string;
    /**
     * Converts this string to a string representation.
     * @param parent Optional parent context; if present, wraps value in quotes
     * @returns String representation
     */
    toString(parent?: BrsType): string;
    /**
     * Concatenates this string with another BrsType value.
     * Converts the other value to string if it's not a string type.
     * @param other BrsType value to concatenate
     * @returns New BrsString with concatenated values
     */
    concat(other: BrsType): BrsString;
    /**
     * Boxes this primitive string into a RoString component.
     * @returns RoString boxed representation
     */
    box(): RoString;
}
/** Internal representation of a boolean in BrightScript. */
export declare class BrsBoolean implements BrsValue, Comparable, Boxable {
    private readonly value;
    inArray: boolean;
    readonly kind = ValueKind.Boolean;
    private constructor();
    /**
     * Converts this BrsBoolean to a JavaScript boolean.
     * @returns JavaScript boolean value
     */
    toBoolean(): boolean;
    static readonly False: BrsBoolean;
    static readonly True: BrsBoolean;
    /**
     * Creates a BrsBoolean from a JavaScript boolean value.
     * Returns the static True or False instance.
     * @param value JavaScript boolean value
     * @returns BrsBoolean.True or BrsBoolean.False
     */
    static from(value: boolean): BrsBoolean;
    /**
     * Compares if this boolean is less than another value.
     * Booleans are never less than any value.
     * @param other Value to compare against
     * @returns Always BrsBoolean.False
     */
    lessThan(other: BrsType): BrsBoolean;
    /**
     * Compares if this boolean is greater than another value.
     * Booleans are never greater than any value.
     * @param other Value to compare against
     * @returns Always BrsBoolean.False
     */
    greaterThan(other: BrsType): BrsBoolean;
    /**
     * Checks if this boolean is equal to another value.
     * @param other Value to compare against
     * @returns True if values are equal, false otherwise
     */
    equalTo(other: BrsType): BrsBoolean;
    /**
     * Gets the underlying boolean value.
     * @returns JavaScript boolean value
     */
    getValue(): boolean;
    /**
     * Converts this boolean to a string representation.
     * @param parent Optional parent context (unused for booleans)
     * @returns String representation ("true" or "false")
     */
    toString(parent?: BrsType): string;
    /**
     * Boxes this primitive boolean into a RoBoolean component.
     * @returns RoBoolean boxed representation
     */
    box(): RoBoolean;
    /**
     * Returns the boolean AND of this value with another value.
     * @param other the other value to AND with this one.
     * @returns `BrsBoolean.True` if both this value and the other are true, otherwise
     *          `BrsBoolean.False`.
     */
    and(other: BrsBoolean | BrsNumber): BrsBoolean;
    /**
     * Returns the boolean OR of this value with another value.
     * @param other the other value to AND with this one.
     * @returns `BrsBoolean.True` if either this value or the other are true, otherwise
     *          `BrsBoolean.False`.
     */
    or(other: BrsBoolean | BrsNumber): BrsBoolean;
    /**
     * Returns the boolean negation of this value with another value.
     * @returns `BrsBoolean.True` if either this value is false, otherwise
     *          `BrsBoolean.False`.
     */
    not(): BrsBoolean;
}
/** Internal representation of the BrightScript `invalid` value. */
export declare class BrsInvalid implements BrsValue, Comparable, Boxable {
    readonly kind = ValueKind.Invalid;
    inArray: boolean;
    static readonly Instance: BrsInvalid;
    /**
     * Compares if invalid is less than another value.
     * Invalid is never less than any value.
     * @param other Value to compare against
     * @returns Always BrsBoolean.False
     */
    lessThan(other: BrsType): BrsBoolean;
    /**
     * Compares if invalid is greater than another value.
     * Invalid is never greater than any value.
     * @param other Value to compare against
     * @returns Always BrsBoolean.False
     */
    greaterThan(other: BrsType): BrsBoolean;
    /**
     * Checks if this invalid value is equal to another value.
     * @param other Value to compare against
     * @returns True if other is also invalid, false otherwise
     */
    equalTo(other: BrsType): BrsBoolean;
    /**
     * Gets the invalid value instance.
     * @returns BrsInvalid singleton instance
     */
    getValue(): BrsInvalid;
    /**
     * Converts invalid to a string representation.
     * @param parent Optional parent context (unused for invalid)
     * @returns String "invalid"
     */
    toString(parent?: BrsType): string;
    /**
     * Boxes this primitive invalid into a RoInvalid component.
     * @returns RoInvalid boxed representation
     */
    box(): RoInvalid;
}
/** Internal representation of uninitialized BrightScript variables. */
export declare class Uninitialized implements BrsValue, Comparable {
    readonly kind = ValueKind.Uninitialized;
    static readonly Instance: Uninitialized;
    /**
     * Compares if uninitialized is less than another value.
     * Uninitialized values are never less than any value.
     * @param other Value to compare against
     * @returns Always BrsBoolean.False
     */
    lessThan(other: BrsType): BrsBoolean;
    /**
     * Compares if uninitialized is greater than another value.
     * Uninitialized values are never greater than any value.
     * @param other Value to compare against
     * @returns Always BrsBoolean.False
     */
    greaterThan(other: BrsType): BrsBoolean;
    /**
     * Gets the uninitialized value.
     * @returns JavaScript undefined
     */
    getValue(): undefined;
    /**
     * Checks if this uninitialized value is equal to another value.
     * Special case: allows comparison to the string "<uninitialized>".
     * @param other Value to compare against
     * @returns True if other is the string "<uninitialized>" (case-insensitive), false otherwise
     */
    equalTo(other: BrsType): BrsBoolean;
    /**
     * Converts uninitialized to a string representation.
     * @param parent Optional parent context (unused for uninitialized)
     * @returns String "<UNINITIALIZED>"
     */
    toString(parent?: BrsType): string;
}
