(
packet: unknown,
options:
| Record<string, unknown>
| ((packet: WritePacket) => any)
| undefined,
callback?: (packet: WritePacket) => any,
)
| 342 | callback: (packet: WritePacket) => any, |
| 343 | ): Promise<void>; |
| 344 | public async handleMessage( |
| 345 | packet: unknown, |
| 346 | options: |
| 347 | | Record<string, unknown> |
| 348 | | ((packet: WritePacket) => any) |
| 349 | | undefined, |
| 350 | callback?: (packet: WritePacket) => any, |
| 351 | ): Promise<void> { |
| 352 | if (isFunction(options)) { |
| 353 | callback = options as (packet: WritePacket) => any; |
| 354 | options = undefined; |
| 355 | } |
| 356 | |
| 357 | const { err, response, isDisposed } = await this.deserializer.deserialize( |
| 358 | packet, |
| 359 | options, |
| 360 | ); |
| 361 | if (isDisposed || err) { |
| 362 | return callback?.({ |
| 363 | err, |
| 364 | response, |
| 365 | isDisposed: true, |
| 366 | }); |
| 367 | } |
| 368 | callback?.({ |
| 369 | err, |
| 370 | response, |
| 371 | }); |
| 372 | } |
| 373 | |
| 374 | protected publish( |
| 375 | message: ReadPacket, |
no test coverage detected