(cb: (error: any, task: () => Promise<any>) => void)
| 98 | } |
| 99 | |
| 100 | onError(cb: (error: any, task: () => Promise<any>) => void) { |
| 101 | this.onErrors.push(cb) |
| 102 | return () => { |
| 103 | this.onErrors = this.onErrors.filter((d) => d !== cb) |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | onSuccess(cb: (result: any, task: () => Promise<any>) => void) { |
| 108 | this.onSuccesses.push(cb) |
no test coverage detected