UNPKG

1.5 kBTypeScriptView Raw
1import { ExtractAuthor, GoalInvocationParameters } from "../../../api-helper/listener/executeAutofixes";
2import { AutofixRegistration } from "../../registration/AutofixRegistration";
3import { CodeTransform } from "../../registration/CodeTransform";
4import { TransformPresentation } from "../../registration/CodeTransformRegistration";
5import { Goal } from "../Goal";
6import { FulfillableGoalDetails, FulfillableGoalWithRegistrations } from "../GoalWithFulfillment";
7/**
8 * Extension to FulfillableGoalDetails to add optional TransformPresentation
9 */
10export interface AutofixGoalDetails extends FulfillableGoalDetails {
11 /**
12 * Optional TransformPresentation to use when pushing autofix commits to repositories.
13 */
14 transformPresentation?: TransformPresentation<GoalInvocationParameters>;
15 /**
16 * Optionally set autofix commit author to author of current head commit or to the
17 * result of the provider ExtractAuthor function.
18 */
19 setAuthor?: boolean | ExtractAuthor;
20}
21/**
22 * Goal that performs autofixes: For example, linting and adding license headers.
23 */
24export declare class Autofix extends FulfillableGoalWithRegistrations<AutofixRegistration<any>> {
25 constructor(goalDetailsOrUniqueName?: AutofixGoalDetails | string, ...dependsOn: Goal[]);
26 /**
27 * Add given transform to this Autofix goal
28 * @param transform
29 * @param name
30 */
31 withTransform(transform: CodeTransform<any>, name?: string): this;
32}
33//# sourceMappingURL=Autofix.d.ts.map
\No newline at end of file