import type { ICallable } from '@qiwi/substrate'; export type TInsideOutPromise = { promise: Promise; resolve: ICallable; reject: ICallable; }; export type IAsyncFn = (...args: any[]) => Promise; export type ITask = { args: any[]; iop: TInsideOutPromise; }; export type ITaskQueue = Array; /** * TODO implement lightweight version of 'inside-out-promise' * @private */ export declare const getPromise: () => TInsideOutPromise; /** * @private * @param target */ export declare const isPromiseLike: (target: any) => boolean; export declare const compose: (cb: ICallable, next: ICallable) => (v: V) => void; export declare const invoke: (fn: IAsyncFn, task: ITask, next: ICallable) => void; export declare const queuefy: (fn: T, limit?: number) => T;