UNPKG

1.27 kBTypeScriptView Raw
1import { HandleCommand } from "@atomist/automation-client/lib/HandleCommand";
2import { OnCommand } from "@atomist/automation-client/lib/onCommand";
3import { CommandDetails } from "@atomist/automation-client/lib/operations/CommandDetails";
4import { NoParameters } from "@atomist/automation-client/lib/SmartParameters";
5import { Maker } from "@atomist/automation-client/lib/util/constructionUtils";
6import { MachineOrMachineOptions } from "../machine/toMachineOptions";
7/**
8 * Wrap a function in a command handler, allowing use of custom parameters.
9 * Targeting (targets property) is handled automatically if the parameters
10 * do not implement TargetsParams
11 * @param sdm machine or options
12 * @param commandMaker function to create command function
13 * @param name command name
14 * @param paramsMaker parameters factory, typically the name of a class with a no arg constructor
15 * @param details optional details to customize behavior
16 * Add intent "edit <name>"
17 */
18export declare function createCommand<PARAMS = NoParameters>(sdm: MachineOrMachineOptions, commandMaker: (sdm: MachineOrMachineOptions) => OnCommand<PARAMS>, name: string, paramsMaker?: Maker<PARAMS>, details?: Partial<CommandDetails>): HandleCommand<PARAMS>;
19//# sourceMappingURL=createCommand.d.ts.map
\No newline at end of file