MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / on

Method on

__tests__/parse-pool.test.ts:35–39  ·  view source on GitHub ↗
(event: string, cb: (...args: any[]) => void)

Source from the content-addressed store, hash-verified

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 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected