export declare const sleep: (m: number) => Promise; export declare function isFunction(value: Function | T): value is Function; /** * A map of known error codes. */ export declare const KnownCodes: { TOKEN_EXPIRED: number; WS_CLOSED_SUCCESS: number; WS_CLOSED_ABRUPTLY: number; WS_POLICY_VIOLATION: number; }; /** * retryInterval - A retry interval which increases acc to number of failures * * @return {number} Duration to wait in milliseconds */ export declare function retryInterval(numberOfFailures: number): number; export declare function randomId(): string; export declare function generateUUIDv4(): string; /** * listenForConnectionChanges - Adds an event listener fired on browser going online or offline */ export declare function addConnectionEventListeners(cb: (e: Event) => void): void; export declare function removeConnectionEventListeners(cb: (e: Event) => void): void; export declare const streamDevToken: (userId: string) => string; export interface DebouncedFunc any> { /** * Call the original function, but applying the debounce rules. * * If the debounced function can be run immediately, this calls it and returns its return * value. * * Otherwise, it returns the return value of the last invocation, or undefined if the debounced * function was not invoked yet. */ (...args: Parameters): ReturnType | undefined; /** * Throw away any pending invocation of the debounced function. */ cancel(): void; /** * If there is a pending invocation of the debounced function, invoke it immediately and return * its return value. * * Otherwise, return the value from the last invocation, or undefined if the debounced function * was never invoked. */ flush(): ReturnType | undefined; } export declare const debounce: any>(fn: T, timeout?: number, { leading, trailing, }?: { leading?: boolean; trailing?: boolean; }) => DebouncedFunc; export declare const capitalize: (s: T) => Capitalize; //# sourceMappingURL=utils.d.ts.map