1 | import { IncomingEvent, IncomingRequest, IncomingResponse } from './packet.interface';
|
2 | /**
|
3 | * @publicApi
|
4 | */
|
5 | export interface Deserializer<TInput = any, TOutput = any> {
|
6 | deserialize(value: TInput, options?: Record<string, any>): TOutput | Promise<TOutput>;
|
7 | }
|
8 | export type ProducerDeserializer = Deserializer<any, IncomingResponse>;
|
9 | export type ConsumerDeserializer = Deserializer<any, IncomingRequest | IncomingEvent>;
|