UNPKG

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