1 | import { OutgoingEvent, OutgoingRequest, OutgoingResponse } from './packet.interface';
|
2 | /**
|
3 | * @publicApi
|
4 | */
|
5 | export interface Serializer<TInput = any, TOutput = any> {
|
6 | serialize(value: TInput, options?: Record<string, any>): TOutput;
|
7 | }
|
8 | export type ProducerSerializer = Serializer<OutgoingEvent | OutgoingRequest, any>;
|
9 | export type ConsumerSerializer = Serializer<OutgoingResponse, any>;
|