export type Collection<T> = ArrayLike<T> | Iterable<T>;
export type Callback = (...args: any[]) => any;
export declare const emptyArray: any;
export interface Resolver<T> {
    resolve(value?: T | PromiseLike<T>): void;
    reject(reason?: any): void;
}
export declare function isTruely<T>(x: T): x is Exclude<T, false | "" | 0 | null | undefined>;
export declare function noop(): void;
export declare function lazyInit<C extends new (...args: any[]) => any>(Class: C, args: ConstructorParameters<C> extends [] ? [] | null | undefined : ConstructorParameters<C>, init?: (Partial<InstanceType<C>> & ThisType<InstanceType<C>>) | null): InstanceType<C>;
export declare function blob2ArrayBuffer(blob: Blob): Promise<ArrayBuffer>;
export declare function arrayBufferToObjectUrl(...data: BlobPart[]): string;
export declare function interceptEvent(e: Event): void;
export declare function getOrCreate<K>(map: Map<K, any>, key: K): any;
export declare function getOrCreate<K, V, A extends any[] = any[]>(map: Map<K, V>, key: K, ctor: new (...args: A) => V, ...args: A): V;
export declare function getOrCreate<K extends object>(map: WeakMap<K, any>, key: K): any;
export declare function getOrCreate<K extends object, V, A extends any[] = any[]>(map: WeakMap<K, V>, key: K, ctor: new (...args: A) => V, ...args: A): V;
export declare function addEventListenerAndCache(cacheList: [EventTarget, string, EventListenerOrEventListenerObject][], target: EventTarget, event: string, callback: EventListenerOrEventListenerObject, options?: AddEventListenerOptions | boolean): [EventTarget, string, EventListenerOrEventListenerObject][];
export declare function delay(duration: number): Promise<void>;
export declare function delay<T>(duration: number, returnValue: T): Promise<T>;
export declare function isArrayLike(src: any): src is ArrayLike<any>;
export declare function isIterable(src: any): src is Iterable<any>;
export declare function tryIterate<T>(src?: Collection<T> | null): Iterable<T>;
export declare function forEach<S extends Iterable<any> | ArrayLike<any>>(src: S, callback: (value: S extends Iterable<infer T> ? T : S extends ArrayLike<infer T> ? T : unknown, value2: S extends Iterable<infer T> ? T : S extends ArrayLike<any> ? number : unknown, src: S) => void): void;
export declare function forEach<S extends Iterable<any> | ArrayLike<any>, A>(src: S, callback: (this: A, value: S extends Iterable<infer T> ? T : S extends ArrayLike<infer T> ? T : never, value2: S extends Iterable<infer T> ? T : S extends ArrayLike<any> ? number : never, src: S) => void, thisArg: A): void;
export declare function defer(callback: Callback, thisArg: any, args: any[]): Promise<any>;
export declare function sanitize(raw: any, filter?: any): any;
export declare function isInFrame(): boolean;
