| 3 | import { PhaseFunction } from "src/Types"; |
| 4 | |
| 5 | class Event implements IStepDefinition { |
| 6 | private hookFunctionType: HookFunctionTypes; |
| 7 | |
| 8 | constructor(hookFunctionType: HookFunctionTypes) { |
| 9 | this.hookFunctionType = hookFunctionType; |
| 10 | } |
| 11 | |
| 12 | get(model: IModelService): PhaseFunction { |
| 13 | return model.events[this.hookFunctionType]; |
| 14 | } |
| 15 | |
| 16 | get name() { |
| 17 | return `event:${this.hookFunctionType}`; |
| 18 | } |
| 19 | |
| 20 | isAsync() { |
| 21 | return false; |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | export default Event; |
nothing calls this directly
no outgoing calls
no test coverage detected