UNPKG

1.36 kBTypeScriptView Raw
1import { EditResult } from "@atomist/automation-client/lib/operations/edit/projectEditor";
2import { Project } from "@atomist/automation-client/lib/project/Project";
3import { NoParameters } from "@atomist/automation-client/lib/SmartParameters";
4import { PushAwareParametersInvocation } from "./PushAwareParametersInvocation";
5export declare type TransformResult = EditResult;
6export declare type TransformReturnable = Project | TransformResult | void;
7/**
8 * Function that can transform a project. Mixing HandlerContextMethods into second
9 * parameter, and third parameter are only for backward compatibility.
10 * New code should use (Project, Command ParametersInvocation).
11 * Projects are naturally mutable.
12 */
13export declare type CodeTransform<P = NoParameters> = (p: Project, papi: PushAwareParametersInvocation<P>, params?: P) => Promise<TransformReturnable>;
14/**
15 * Compatible with CodeTransform but returns TransformResult.
16 * At the cost of greater ceremony, guarantees the return of more information.
17 */
18export declare type ExplicitCodeTransform<P = NoParameters> = (p: Project, papi: PushAwareParametersInvocation<P>, params?: P) => Promise<TransformResult>;
19/**
20 * One or many CodeTransforms
21 */
22export declare type CodeTransformOrTransforms<PARAMS> = CodeTransform<PARAMS> | Array<CodeTransform<PARAMS>>;
23//# sourceMappingURL=CodeTransform.d.ts.map
\No newline at end of file