added TSDocs for the option

Signed-off-by: Hao Luo <howlowck@gmail.com>
This commit is contained in:
Hao Luo
2022-10-17 17:10:16 -05:00
parent 57f61203bc
commit 05644d862e
@@ -51,6 +51,18 @@ export type CreateWorkerOptions = {
workingDirectory: string;
logger: Logger;
additionalTemplateFilters?: Record<string, TemplateFilter>;
/**
* The number of tasks that can be executed at the same time by the worker
* @defaultValue 10
* @example
* ```
* {
* concurrentTasksLimit: 1,
* // OR
* concurrentTasksLimit: Infinity
* }
* ```
*/
concurrentTasksLimit?: number;
additionalTemplateGlobals?: Record<string, TemplateGlobal>;
};
@@ -75,7 +87,7 @@ export class TaskWorker {
integrations,
workingDirectory,
additionalTemplateFilters,
concurrentTasksLimit = 2, // Or Infinity
concurrentTasksLimit = 10, // from 1 to Infinity
additionalTemplateGlobals,
} = options;