import { Maybe } from "./maybe"; /** Asynchronous pool options */ export interface AsyncPoolOption { /** Maximum concurrency limit */ limit?: number; } /** Asynchronous pool * Used to ensure that the number of asynchronous executions at the same time does not exceed the limit */ export declare class AsyncPool { #private; /** @param limit Maximum concurrency limit */ constructor(limit?: Maybe); /** @param option Asynchronous pool options */ constructor(option?: AsyncPoolOption); /** The number of asynchronous tasks executed in the current pool */ get size(): number; /** Run asynchronous tasks in the pool * Task may be delayed to start execution */ run(f: () => PromiseLike): Promise; }