Skip to content

Commit

Permalink
feat(types): add call back function support to decide generator sched…
Browse files Browse the repository at this point in the history
…uling (#6)

* add call back function support to deceide generator scheduling

requiredby jhipster/generator-jhipster#25445

* incorporate review suggestions
  • Loading branch information
dwarakaprasad authored and mshima committed Mar 9, 2024
1 parent 6a5bf93 commit dca1eee
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion workspaces/types/types/environment/methods-options.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,13 @@ export type InstantiateOptions<G extends BaseGenerator = BaseGenerator> = {
generatorOptions?: Partial<Omit<GetGeneratorOptions<G>, 'env' | 'resolved' | 'namespace'>> | undefined;
};

export type ComposeOptions<G extends BaseGenerator = BaseGenerator> = InstantiateOptions<G> & { schedule?: boolean };
export type ComposeOptions<G extends BaseGenerator = BaseGenerator> = InstantiateOptions<G> & SchedulingOptions<G>;

export type SchedulingOptions<G extends BaseGenerator = BaseGenerator> = {
/**
* Creates a new task to queue the composed generator tasks instead of queueing immediately.
* The task is queued in an Environment’s internal priority which is executed before any generator task.
* Function is accepted starting from Environment 4.4.0.
*/
schedule?: boolean | ((generator: G) => boolean);
};

0 comments on commit dca1eee

Please sign in to comment.