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

Function onMessage

__tests__/mcp-projectpath-lifecycle.test.ts:172–177  ·  view source on GitHub ↗
(message: unknown)

Source from the content-addressed store, hash-verified

170 async function armIdleExit(owner: ChildProcess): Promise<void> {
171 await new Promise<void>((resolve, reject) => {
172 const onMessage = (message: unknown): void => {
173 if (message !== 'idle-armed') return;
174 owner.off('exit', onExit);
175 owner.off('message', onMessage);
176 resolve();
177 };
178 const onExit = (): void => { owner.off('message', onMessage); reject(new Error('Owner exited before arming idle exit')); };
179 owner.on('message', onMessage);
180 owner.once('exit', onExit);

Callers

nothing calls this directly

Calls 1

resolveFunction · 0.70

Tested by

no test coverage detected