(res: JRPCResponse<unknown>, _encoding: unknown, cb: (error?: Error | null) => void)
| 104 | } |
| 105 | |
| 106 | function processMessage(res: JRPCResponse<unknown>, _encoding: unknown, cb: (error?: Error | null) => void) { |
| 107 | let err: Error; |
| 108 | try { |
| 109 | const isNotification = isJRPCNotification(res as JRPCNotification<JRPCParams> | JRPCRequest<JRPCParams>); |
| 110 | if (isNotification) { |
| 111 | processNotification(res as JRPCNotification<JRPCParams>); |
| 112 | } else { |
| 113 | processResponse(res); |
| 114 | } |
| 115 | } catch (_err: unknown) { |
| 116 | err = _err as Error; |
| 117 | } |
| 118 | // continue processing stream |
| 119 | cb(err); |
| 120 | } |
| 121 | |
| 122 | const stream = new Duplex({ |
| 123 | objectMode: true, |
nothing calls this directly
no test coverage detected