(fields: ReadonlyArray<readonly [string, string]>)
| 171 | } |
| 172 | |
| 173 | const errorResponse = (fields: ReadonlyArray<readonly [string, string]>): Buffer => |
| 174 | backendMessage( |
| 175 | "E", |
| 176 | Buffer.concat([ |
| 177 | ...fields.map(([code, value]) => Buffer.from(`${code}${value}\0`)), |
| 178 | Buffer.from([0]) |
| 179 | ]) |
| 180 | ) |
| 181 | |
| 182 | const withTcpServer = ( |
| 183 | onConnection: (socket: Net.Socket) => void |
no test coverage detected