export declare const enum Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 } /** * Safer version of `Function` which should not be called. * Every function should be assignable to this, but this should not be assignable to every function. */ export type AnyFunction = (...args: never[]) => void; /** Do nothing and return false */ export declare function returnFalse(): false; /** Do nothing and return true */ export declare function returnTrue(): true; /** Do nothing and return undefined */ export declare function returnUndefined(): undefined; /** Returns its argument. */ export declare function identity(x: T): T; /** Returns lower case string */ export declare function toLowerCase(x: string): string; export declare function equateValues(a: T, b: T): boolean; export declare function compareComparableValues(a: string | undefined, b: string | undefined): Comparison; export declare function compareComparableValues(a: number | undefined, b: number | undefined): Comparison; /** * Compare two numeric values for their order relative to each other. * To compare strings, use any of the `compareStrings` functions. */ export declare function compareValues(a: number | undefined, b: number | undefined): Comparison; /** * Tests whether a value is an array. */ export declare function isArray(value: any): value is T; /** * Tests whether a value is string */ export declare function isString(text: unknown): text is string; export declare function isNumber(x: unknown): x is number; export declare function isBoolean(x: unknown): x is boolean; /** * Type of objects whose values are all of the same type. * The `in` and `for-in` operators can *not* be safely used, * since `Object.prototype` may be modified by outside code. */ export interface MapLike { readonly [Symbol.toStringTag]: string; get(key: K): V | undefined; has(key: K): boolean; set(key: K, value: V): this; } /** * Indicates whether a map-like contains an own property with the specified key. * * @param map A map-like. * @param key A property key. */ export declare function hasProperty(map: { [index: string]: any; }, key: string): boolean; /** * Convert the given value to boolean * @param trueOrFalse string value 'true' or 'false' */ export declare function toBoolean(trueOrFalse: string): boolean; export declare function test_setDebugMode(debugMode: boolean | undefined): boolean | undefined; export declare function isDebugMode(): boolean; interface Thenable { then(onfulfilled?: (value: T) => TResult | Thenable, onrejected?: (reason: any) => TResult | Thenable): Thenable; then(onfulfilled?: (value: T) => TResult | Thenable, onrejected?: (reason: any) => void): Thenable; } export declare function isThenable(v: any): v is Thenable; export declare function isDefined(element: T | undefined): element is T; export declare function getEnumNames(enumType: T): string[]; export declare function containsOnlyWhitespace(text: string, start?: number, end?: number): boolean; export declare function cloneStr(str: string): string; export declare namespace Disposable { function is(value: any): value is { dispose(): void; }; } export {};