This repository was archived by the owner on Mar 19, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 1
1
2
2
import { Match , GraphNode } from "@atomist/rug/tree/PathExpression" ;
3
- import { Plan , Message , HandleEvent } from "@atomist/rug/operations/Handlers" ;
3
+ import { Plan , HandleEvent } from "@atomist/rug/operations/Handlers" ;
4
4
5
5
/**
6
6
* Convenient event handler superclass when we're only interested in the root
7
- * match
7
+ * match. This is the commonest case.
8
8
*/
9
- export abstract class RootHandler < R extends GraphNode > implements HandleEvent < R , R > {
9
+ export abstract class RootHandler < R extends GraphNode > implements HandleEvent < R , R > {
10
10
11
- handle ( m : Match < R , R > ) : Plan | Message {
12
- return this . onMatch ( m . root ( ) ) ;
13
- }
11
+ handle ( m : Match < R , R > ) : Plan {
12
+ return this . onMatch ( m . root ( ) ) ;
13
+ }
14
14
15
- abstract onMatch ( root : R ) : Plan | Message ;
15
+ /**
16
+ * Handle the given root match
17
+ * @param root root node of the match
18
+ */
19
+ abstract onMatch ( root : R ) : Plan ;
16
20
17
21
}
Original file line number Diff line number Diff line change 4
4
"description" : " Helper functions for Rugs" ,
5
5
"dependencies" : {
6
6
"@atomist/cortex" : " ^0.19.0" ,
7
+ "@atomist/rug" : " ^0.20.0" ,
7
8
"mustache" : " ^2.3.0"
8
9
},
9
10
"scripts" : {
You can’t perform that action at this time.
0 commit comments