UNPKG

1.06 kBTypeScriptView Raw
1import { Goal } from "../Goal";
2import { Goals } from "../Goals";
3import { FulfillableGoal, FulfillableGoalDetails } from "../GoalWithFulfillment";
4import { SdmGoalEvent } from "../SdmGoalEvent";
5/**
6 * Options to configure the Cancel goal
7 */
8export interface CancelOptions {
9 /**
10 * Goals that should be canceled if they are in a state that allows cancellation
11 */
12 goals: Array<Goal | Goals>;
13 /**
14 * Name of goals that should be canceled if they are in a state that allows cancellation
15 */
16 goalNames?: string | string[];
17 /**
18 * Filter goals to cancel based on goalSet or state
19 * @param goalSet
20 */
21 goalFilter?: (goal: SdmGoalEvent) => boolean;
22}
23export declare const DefaultCancelOptions: CancelOptions;
24/**
25 * Goal to cancel pending goals in goal sets of the previous commit on the same branch
26 */
27export declare class Cancel extends FulfillableGoal {
28 private readonly options;
29 constructor(options?: FulfillableGoalDetails & CancelOptions, ...dependsOn: Goal[]);
30}
31//# sourceMappingURL=Cancel.d.ts.map
\No newline at end of file