export declare function dumpLine(line: string): void; declare global { interface String { padRight(c: string, n: number): string; padLeft(c: string, n: number): string; endsWith(s: string): boolean; } } /** * The buffer length required to contain any unsigned 32-bit integer. */ /** @const */ export declare var UINT32_CHAR_BUFFER_LENGTH: number; /** @const */ export declare var UINT32_MAX: number; /** @const */ export declare var UINT32_MAX_DIV_10: number; /** @const */ export declare var UINT32_MAX_MOD_10: number; export declare function isString(value: any): boolean; export declare function isFunction(value: any): boolean; export declare function isNumber(value: any): boolean; export declare function isInteger(value: any): boolean; export declare function isArray(value: any): boolean; export declare function isNumberOrString(value: any): boolean; export declare function isObject(value: any): boolean; export declare function toNumber(x: any): number; export declare function isNumericString(value: string): boolean; /** * Whether the specified |value| is a number or the string representation of a number. */ export declare function isNumeric(value: any): boolean; /** * Whether the specified |value| is an unsigned 32 bit number expressed as a number * or string. */ export declare function isIndex(value: any): boolean; export declare function isNullOrUndefined(value: any): boolean; export declare function argumentsToString(args: IArguments): string; export declare function getTicks(): number; /** * Marsaglia's algorithm, adapted from V8. Use this if you want a deterministic random number. */ export declare class Random { private static _state; static seed(seed: number): void; static reset(): void; static next(): number; } /** * This should only be called if you need fake time. */ export declare function installTimeWarper(): void; export interface IReferenceCountable { _referenceCount: number; _addReference(): any; _removeReference(): any; } export declare class WeakList { private _map; private _newAdditions; private _list; private _id; constructor(); clear(): void; push(value: T): void; remove(value: T): void; forEach(callback: (value: T) => void): void; get length(): number; } export declare const enum Numbers { MaxU16 = 65535, MaxI16 = 32767, MinI16 = -32768 } export declare const enum LogLevel { Error = 1, Warn = 2, Debug = 4, Log = 8, Info = 16, All = 31 } export declare class IndentingWriter { static PURPLE: string; static YELLOW: string; static GREEN: string; static RED: string; static BOLD_RED: string; static ENDC: string; static logLevel: LogLevel; private static _consoleOut; private static _consoleOutNoNewline; private _tab; private _padding; private _suppressOutput; private _out; private _outNoNewline; get suppressOutput(): boolean; set suppressOutput(val: boolean); constructor(suppressOutput?: boolean, out?: any); write(str?: string, writePadding?: boolean): void; writeLn(str?: string): void; writeObject(str?: string, object?: Object): void; writeTimeLn(str?: string): void; writeComment(str: string): void; writeLns(str: string): void; errorLn(str: string): void; warnLn(str: string): void; debugLn(str: string): void; logLn(str: string): void; infoLn(str: string): void; yellowLn(str: string): void; greenLn(str: string): void; boldRedLn(str: string): void; redLn(str: string): void; purpleLn(str: string): void; colorLn(color: string, str: string): void; redLns(str: string): void; colorLns(color: string, str: string): void; enter(str: string): void; leaveAndEnter(str: string): void; leave(str?: string): void; indent(): void; outdent(): void; writeArray(arr: any[], detailed?: boolean, noNumbers?: boolean): void; } export declare class CircularBuffer { index: number; start: number; array: ArrayBufferView; _size: number; _mask: number; constructor(Type: any, sizeInBits?: number); get(i: any): any; forEachInReverse(visitor: any): void; write(value: any): void; isFull(): boolean; isEmpty(): boolean; reset(): void; } export declare class ColorStyle { static TabToolbar: string; static Toolbars: string; static HighlightBlue: string; static LightText: string; static ForegroundText: string; static Black: string; static VeryDark: string; static Dark: string; static Light: string; static Grey: string; static DarkGrey: string; static Blue: string; static Purple: string; static Pink: string; static Red: string; static Orange: string; static LightOrange: string; static Green: string; static BlueGrey: string; private static _randomStyleCache; private static _nextStyle; static randomStyle(): any; private static _gradient; static gradientColor(value: any): string; static contrastStyle(rgb: string): string; static reset(): void; } export interface UntypedBounds { xMin: number; yMin: number; xMax: number; yMax: number; } export interface ASRectangle { x: number; y: number; width: number; height: number; } /** * Faster release version of bounds. */ export declare class Bounds { xMin: number; yMin: number; xMax: number; yMax: number; constructor(xMin: number, yMin: number, xMax: number, yMax: number); static FromUntyped(source: UntypedBounds): Bounds; static FromRectangle(source: ASRectangle): Bounds; setElements(xMin: number, yMin: number, xMax: number, yMax: number): void; copyFrom(source: Bounds): void; contains(x: number, y: number): boolean; unionInPlace(other: Bounds): void; extendByPoint(x: number, y: number): void; extendByX(x: number): void; extendByY(y: number): void; intersects(toIntersect: Bounds): boolean; isEmpty(): boolean; get width(): number; set width(value: number); get height(): number; set height(value: number); getBaseWidth(angle: number): number; getBaseHeight(angle: number): number; setEmpty(): void; /** * Set all fields to the sentinel value 0x8000000. * * This is what Flash uses to indicate uninitialized bounds. Important for bounds calculation * in `Graphics` instances, which start out with empty bounds but must not just extend them * from an 0,0 origin. */ setToSentinels(): void; clone(): Bounds; toString(): string; } /** * Slower debug version of bounds, makes sure that all points have integer coordinates. */ export declare class DebugBounds { private _xMin; private _yMin; private _xMax; private _yMax; constructor(xMin: number, yMin: number, xMax: number, yMax: number); static FromUntyped(source: UntypedBounds): DebugBounds; static FromRectangle(source: ASRectangle): DebugBounds; setElements(xMin: number, yMin: number, xMax: number, yMax: number): void; copyFrom(source: DebugBounds): void; contains(x: number, y: number): boolean; unionInPlace(other: DebugBounds): void; extendByPoint(x: number, y: number): void; extendByX(x: number): void; extendByY(y: number): void; intersects(toIntersect: DebugBounds): boolean; isEmpty(): boolean; set xMin(value: number); get xMin(): number; set yMin(value: number); get yMin(): number; set xMax(value: number); get xMax(): number; get width(): number; set yMax(value: number); get yMax(): number; get height(): number; getBaseWidth(angle: number): number; getBaseHeight(angle: number): number; setEmpty(): void; clone(): DebugBounds; toString(): string; private assertValid; } /** * Override Bounds with a slower by safer version, don't do this in release mode. */ export declare class Color { r: number; g: number; b: number; a: number; constructor(r: number, g: number, b: number, a: number); static FromARGB(argb: number): Color; static FromRGBA(rgba: number): Color; toRGBA(): number; toCSSStyle(): string; set(other: Color): void; static Red: Color; static Green: Color; static Blue: Color; static None: Color; static White: Color; static Black: Color; private static colorCache; static randomColor(alpha?: number): Color; static parseColor(color: string): Color; } export declare function registerCSSFont(id: number, data: Uint8Array, forceFontInit: boolean): void; export declare class Callback { private _queues; constructor(); register(type: any, callback: any): void; unregister(type: string, callback: any): void; notify(type: string, args: any): void; notify1(type: string, value: any): void; } export declare enum ImageType { None = 0, /** * Premultiplied ARGB (byte-order). */ PremultipliedAlphaARGB = 1, /** * Unpremultiplied ARGB (byte-order). */ StraightAlphaARGB = 2, /** * Unpremultiplied RGBA (byte-order), this is what putImageData expects. */ StraightAlphaRGBA = 3, JPEG = 4, PNG = 5, GIF = 6 } export declare function getMIMETypeForImageType(type: ImageType): string; export declare class PromiseWrapper { promise: Promise; resolve: (result: T) => void; reject: (reason: any) => void; then(onFulfilled: any, onRejected: any): Promise; constructor(); } //# sourceMappingURL=utilities.d.ts.map