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

Method on

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

Source from the content-addressed store, hash-verified

49 setTimeout(() => { if (this.alive && readyOk !== null) this.emitMessage({ type: 'ready', ok: readyOk }); }, 0);
50 }
51 on(event: string, cb: (...args: any[]) => void): void {
52 if (event === 'message') this.msgCb = cb;
53 else if (event === 'exit') this.exitCb = cb;
54 else if (event === 'error') this.errorCb = cb;
55 }
56 emitMessage(m: unknown): void { this.msgCb?.(m); }
57 emitError(): void { this.errorCb?.(new Error('worker failed')); }
58 emitExit(): void { this.exitCb?.(13); }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected