import loglevel from "loglevel"; /** * returns true if the given object is a promise */ export declare function isPromise(obj: unknown): boolean; export declare const PROMISE_RESOLVED_FALSE: Promise; export declare const PROMISE_RESOLVED_TRUE: Promise; export declare const PROMISE_RESOLVED_VOID: Promise; export declare function sleep(time?: number, resolveWith?: T): Promise; export declare function randomInt(min: number, max: number): number; /** * https://stackoverflow.com/a/8084248 */ export declare function generateRandomId(): string; /** * returns the current time in micro-seconds, * WARNING: This is a pseudo-function * Performance.now is not reliable in webworkers, so we just make sure to never return the same time. * This is enough in browsers, and this function will not be used in nodejs. * The main reason for this hack is to ensure that BroadcastChannel behaves equal to production when it is used in fast-running unit tests. */ export declare function microSeconds(): number; export declare const log: loglevel.Logger; export declare const setLogLevel: (level: loglevel.LogLevelDesc) => void;