import { AnyFunction, ObjectLiteral } from "../typings"; /** Returns a callback that will call all functions passed with the same arguments */ export declare const callAll: >(...fns: Fns[]) => (...args: Args[]) => void; /** Returns a callback that will return true if all functions passed with the same arguments returns true */ export declare const needsAll: >(...fns: Fns[]) => (...args: Args[]) => boolean; export type Composable = (item: T) => R; /** Compose left-to-right, most commonly used direction */ export declare const pipe: (...fns: ((arg: T) => T)[]) => (value: T) => T; /** Compose right-to-left */ export declare const compose: (...fns: ((arg: T) => T)[]) => (value: T) => T; /** Compose right-to-left using async fn */ export declare const composeAsync: (...functions: Composable[]) => (item: T) => Promise>; /** Compose left-to-right, most commonly used direction, using async fn */ export declare const pipeAsync: (...functions: Composable[]) => (item: T) => Promise>; /** Wait for X ms till resolving promise (with optional callback) */ export declare const wait: any>(duration: number, callback?: T) => Promise infer U ? U : never>; /** * Gets given's entity all inherited classes. * Gives in order from parents to children. * For example Post extends ContentModel which extends Unit it will give * [Unit, ContentModel, Post] * * Taken from typeorm/src/metadata-builder/MetadataUtils.ts * @see https://github.com/typeorm/typeorm/ */ export declare function getInheritanceTree(entity: Function): Function[]; export declare const on: (obj: HTMLElement | Document | Window, type: K, listener: AnyFunction, options?: boolean | AddEventListenerOptions) => () => void; export declare const off: (obj: HTMLElement | Document | Window, type: K, listener: AnyFunction, options?: boolean | EventListenerOptions) => void; export declare const getQueryParams: () => URLSearchParams; export declare const getQueryString: (data: Record) => string; export declare const makeCompiledFnWith: (code: string, context: ObjectLiteral) => any; /** @see Adapted from https://github.com/devld/go-drive/blob/6a126a6daa92af871ae5233306a808c81c749e70/web/src/utils/index.ts */ export declare const debounce: , THIS>(func: Fn, wait: number) => (...args: Parameters) => void; export interface ThrottleOptions { leading?: boolean; trailing?: boolean; } /** @see Adapted from https://github.com/devld/go-drive/blob/6a126a6daa92af871ae5233306a808c81c749e70/web/src/utils/index.ts */ export declare function throttle(func: Fn, wait: number, options?: ThrottleOptions): (...args: Parameters) => ReturnType; //# sourceMappingURL=misc.d.ts.map