@atomist/sdm
Version:
Atomist Software Delivery Machine SDK
23 lines • 1.36 kB
TypeScript
import { EditResult } from "@atomist/automation-client/lib/operations/edit/projectEditor";
import { Project } from "@atomist/automation-client/lib/project/Project";
import { NoParameters } from "@atomist/automation-client/lib/SmartParameters";
import { PushAwareParametersInvocation } from "./PushAwareParametersInvocation";
export declare type TransformResult = EditResult;
export declare type TransformReturnable = Project | TransformResult | void;
/**
* Function that can transform a project. Mixing HandlerContextMethods into second
* parameter, and third parameter are only for backward compatibility.
* New code should use (Project, Command ParametersInvocation).
* Projects are naturally mutable.
*/
export declare type CodeTransform<P = NoParameters> = (p: Project, papi: PushAwareParametersInvocation<P>, params?: P) => Promise<TransformReturnable>;
/**
* Compatible with CodeTransform but returns TransformResult.
* At the cost of greater ceremony, guarantees the return of more information.
*/
export declare type ExplicitCodeTransform<P = NoParameters> = (p: Project, papi: PushAwareParametersInvocation<P>, params?: P) => Promise<TransformResult>;
/**
* One or many CodeTransforms
*/
export declare type CodeTransformOrTransforms<PARAMS> = CodeTransform<PARAMS> | Array<CodeTransform<PARAMS>>;
//# sourceMappingURL=CodeTransform.d.ts.map