UNPKG

827 BTypeScriptView Raw
1import { HandlerContext } from "@atomist/automation-client/lib/HandlerContext";
2/**
3 * Skills get additional contextual information when they
4 * execute
5 */
6export interface SkillContext<C = any> {
7 /** Optional configuration of the skill */
8 configuration?: SkillConfiguration<C>;
9}
10/**
11 * Skills get configured and the named configuration gets
12 * passed to the running command or event handler
13 */
14export interface SkillConfiguration<C extends Record<string, any> = any> {
15 /** Name of the configuration */
16 name: string;
17 /** */
18 parameters: C;
19}
20/**
21 * Helper function to create a SkillContext instance
22 * from the passed in HandlerContext
23 */
24export declare function createSkillContext<C extends Record<string, any> = any>(ctx: HandlerContext): SkillContext<C>;
25//# sourceMappingURL=skillContext.d.ts.map
\No newline at end of file