node-ejs-renderer/node_modules/thingies/es6/concurrencyDecorator.d.ts

7 lines
494 B
TypeScript
Raw Permalink Normal View History

2024-06-09 13:55:01 -04:00
/**
* A class method decorator that limits the concurrency of the method to the
* given number of parallel executions. All invocations are queued and executed
* in the order they were called.
*/
export declare function concurrency<This, Args extends any[], Return>(limit: number): (fn: (this: This, ...args: Args) => Promise<Return>, context?: ClassMethodDecoratorContext<This, (this: This, ...args: Args) => Promise<Return>> | undefined) => (this: This, ...args: Args) => Promise<Return>;