(event: string, cb: (...args: any[]) => void)
| 33 | alive = true; |
| 34 | constructor(private behavior: (m: ParseMsg) => Action, private onTerminate?: () => void) {} |
| 35 | on(event: string, cb: (...args: any[]) => void): void { |
| 36 | if (event === 'message') this.msgCb = cb; |
| 37 | else if (event === 'exit') this.exitCb = cb; |
| 38 | // 'error' unused by the fakes |
| 39 | } |
| 40 | private reply(id: number, result: ExtractionResult, parseMs?: number): void { |
| 41 | if (this.alive) this.msgCb?.({ type: 'parse-result', id, result, parseMs }); |
| 42 | } |
nothing calls this directly
no outgoing calls
no test coverage detected