1 | import { Dependency, TaskDep } from './task';
|
2 | import { TaskContext } from './task-manager';
|
3 | export declare class DepBuilder<O = any> {
|
4 | private _dep;
|
5 | readonly _isDepBuilder = true;
|
6 | constructor(name: Dependency);
|
7 | /**
|
8 | *
|
9 | * Dependences are executed serially by default.
|
10 | * If order doesn't matter and you want better performance via parallel, you can mark it as asynchronized.
|
11 | * Asynchronized will run immediately whether there are synchronized tasks before them or not.
|
12 | * You can pass a number as the priority of asynchronized tasks, bigger is formmer.
|
13 | * @param priority
|
14 | */
|
15 | async(priority?: number | boolean): this;
|
16 | force(): this;
|
17 | options(opts: O | ((ctx: TaskContext) => O)): this;
|
18 | toTaskDep(): TaskDep<O>;
|
19 | }
|
20 | export declare function dep(dep: Dependency): DepBuilder<any>;
|
21 | declare global {
|
22 | interface String {
|
23 | |
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | async(priority?: number | boolean): DepBuilder;
|
30 | force(): DepBuilder;
|
31 | options<O>(opts: O | NonNullable<TaskDep['resolveOptions']>): DepBuilder;
|
32 | }
|
33 | }
|