import { ValueKind, BrsInvalid, BrsBoolean, BrsString, Uninitialized, BrsValue, Comparable } from "./BrsType"; import { RoArray } from "./components/RoArray"; import { RoList } from "./components/RoList"; import { RoByteArray } from "./components/RoByteArray"; import { RoAssociativeArray } from "./components/RoAssociativeArray"; import { Int32 } from "./Int32"; import { Int64 } from "./Int64"; import { Float } from "./Float"; import { Double } from "./Double"; import { Callable } from "./Callable"; import { BrsComponent } from "./components/BrsComponent"; import { BrsInterface } from "./BrsInterface"; import { roDouble } from "./components/RoDouble"; import { roFloat } from "./components/RoFloat"; import { roInt } from "./components/RoInt"; import { roLongInteger } from "./components/RoLongInteger"; import { RoDeviceInfoEvent } from "./components/RoDeviceInfoEvent"; import { RoSGNodeEvent } from "./components/RoSGNodeEvent"; import { RoSGScreenEvent } from "./components/RoSGScreenEvent"; export * from "./BrsType"; export * from "./Int32"; export * from "./Int64"; export * from "./Float"; export * from "./Double"; export * from "./BrsInterface"; export * from "./Callable"; export * from "./components/BrsComponent"; export * from "./components/RoDeviceInfo"; export * from "./components/RoArray"; export * from "./components/RoList"; export * from "./components/RoByteArray"; export * from "./components/RoDateTime"; export * from "./components/RoAssociativeArray"; export * from "./components/RoTimespan"; export * from "./components/BrsObjects"; export * from "./components/RoRegex"; export * from "./components/RoXMLElement"; export * from "./components/RoString"; export * from "./components/RoBoolean"; export * from "./components/RoDouble"; export * from "./components/RoFloat"; export * from "./components/RoInt"; export * from "./components/RoLongInteger"; export * from "./components/RoInvalid"; export * from "./components/RoSGNodeEvent"; export * from "./components/RoSGNode"; export * from "./components/RoMessagePort"; export * from "./components/RoAppInfo"; export * from "./components/RoPath"; export * from "./nodes/NodeFactory"; export * from "./nodes/Group"; export * from "./nodes/Scene"; export * from "./nodes/MiniKeyboard"; export * from "./nodes/TextEditBox"; export * from "./nodes/LayoutGroup"; export * from "./nodes/Rectangle"; export * from "./nodes/Label"; export * from "./nodes/Font"; export * from "./nodes/Poster"; export * from "./nodes/ArrayGrid"; export * from "./nodes/MarkupGrid"; export * from "./nodes/ContentNode"; export * from "./nodes/Timer"; export * from "./Boxing"; export * from "./Coercion"; /** * Determines whether or not the given value is a number. * @param value the BrightScript value in question. * @returns `true` if `value` is a numeric value, otherwise `false`. */ export declare function isBrsNumber(value: BrsType): value is BrsNumber; export declare function isNumberKind(kind: ValueKind): boolean; export declare const NumberKinds: Set; export declare const PrimitiveKinds: Set; /** * Determines whether or not the given value is a string. * @param value the BrightScript value in question. * @returns `true` if `value` is a string, otherwise `false`. */ export declare function isBrsString(value: BrsType): value is BrsString; /** * Determines whether or not the given value is a boolean. * @param value the BrightScript value in question. * @returns `true` if `value` if a boolean, otherwise `false`. */ export declare function isBrsBoolean(value: BrsType): value is BrsBoolean; /** * Determines whether or not the given value is a BrightScript callable. * @param value the BrightScript value in question. * @returns `true` if `value` is a Callable value, otherwise `false`. */ export declare function isBrsCallable(value: BrsType): value is Callable; /** * Determines whether or not the provided value is an instance of a iterable BrightScript type. * @param value the BrightScript value in question. * @returns `true` if `value` can be iterated across, otherwise `false`. */ export declare function isIterable(value: BrsType): value is Iterable; /** * Determines whether or not the given value can be compared as a string. * @param value the BrightScript value in question. * @returns `true` if `value` can be compared as a string, otherwise `false`. */ export declare function isStringComp(value: BrsType): value is BrsString & Comparable; /** * Determines whether or not the given value can be compared as a number. * @param value the BrightScript value in question. * @returns `true` if `value` can be compared as a number, otherwise `false`. */ export declare function isNumberComp(value: BrsType): value is BrsType & Comparable; /** Determines whether or not the given value is a BrightScript boxed number. * @param value the BrightScript value in question. * @returns `true` if `value` is a boxed number, otherwise `false`. */ export declare function isBoxedNumber(value: BrsType): value is BoxedNumber; /** The set of BrightScript numeric types. */ export type BrsNumber = Int32 | Int64 | Float | Double; /** The set of BrightScript boxed numeric types. */ export type BoxedNumber = roInt | roFloat | roDouble | roLongInteger; /** * Determines whether or not the given value is a BrightScript event component. * @param value the BrightScript value in question. * @returns `true` if `value` is a BrightScript event component, otherwise `false`. */ export declare function isBrsEvent(value: BrsType): value is BrsEvent; export type BrsEvent = RoDeviceInfoEvent | RoSGNodeEvent | RoSGScreenEvent; /** * The set of all comparable BrightScript types. Only primitive (i.e. intrinsic * and unboxed) * BrightScript types are comparable to each other. */ export type BrsPrimitive = BrsInterface | BrsInvalid | BrsBoolean | BrsString | BrsNumber; /** The set of BrightScript iterable types. */ export type Iterable = RoArray | RoList | RoAssociativeArray | RoByteArray; export type AllComponents = { kind: ValueKind.Object; } & BrsComponent & BrsValue; /** The set of all supported types in BrightScript. */ export type BrsType = BrsPrimitive | Iterable | Callable | AllComponents | Uninitialized; export declare function isBrsType(value: any): value is BrsType; /** The valid ISO Date formats for roDateTime and roTimeSpan parsing */ export declare const ValidDateFormats: string[]; /** * Converts a JavaScript object or Map to a RoAssociativeArray, converting each property or entry to the corresponding BrightScript type. * @param input The JavaScript object or Map to convert. * @returns A RoAssociativeArray with the converted properties or entries. */ export declare function toAssociativeArray(input: any): RoAssociativeArray; /** * Converts a value to its representation as a BrsType. If no such * representation is possible, throws an Error. * @param {any} x Some value. * @return {BrsType} The BrsType representation of `x`. * @throws {Error} If `x` cannot be represented as a BrsType. */ export declare function brsValueOf(x: any): BrsType;