MCPcopy Create free account
hub / github.com/codeaashu/claude-code / onData

Function onData

src/server/web/__tests__/session-manager.test.ts:12–15  ·  view source on GitHub ↗
(handler: (data: string) => void)

Source from the content-addressed store, hash-verified

10function createMockPty(): IPty & { _dataHandler?: (d: string) => void; _exitHandler?: (e: { exitCode: number; signal: number }) => void } {
11 const mockPty = {
12 onData(handler: (data: string) => void) {
13 mockPty._dataHandler = handler;
14 return { dispose() {} };
15 },
16 onExit(handler: (e: { exitCode: number; signal: number }) => void) {
17 mockPty._exitHandler = handler;
18 return { dispose() {} };

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected