UNPKG

@atomist/sdm

Version:

Atomist Software Delivery Machine SDK

38 lines 1.4 kB
import { PushListenerInvocation } from "../../listener/PushListener"; import { Predicated } from "../PredicateMapping"; import { PushMapping } from "../PushMapping"; import { PushTest } from "../PushTest"; import { StaticPushMapping } from "./StaticPushMapping"; /** * Generic DSL support for returning an object on a push */ export declare class PushRule<V = any> implements StaticPushMapping<V>, Predicated<PushListenerInvocation> { protected guard1: PushTest; protected guards: PushTest[]; private staticValue; get value(): V; get name(): string; /** * The test for this rule */ readonly pushTest: PushTest; get test(): PushTest; private reason; constructor(guard1: PushTest, guards: PushTest[], reason?: string); /** * Set an additional reason if we want to add information to that which is * available from the push tests themselves * @param {string} reason * @return {this} */ itMeans(reason: string): this; /** * Set the value that will be resolved from this rule * @param {V} value * @return {this} */ set(value: V): this; mapping(p: PushListenerInvocation): Promise<V | undefined>; } export declare function isPredicatedStaticValue<T>(pushMapping: PushMapping<T>): pushMapping is StaticPushMapping<T> & Predicated<PushListenerInvocation>; //# sourceMappingURL=PushRule.d.ts.map