UNPKG

354 BTypeScriptView Raw
1import { OutgoingEvent, OutgoingRequest, OutgoingResponse } from './packet.interface';
2export interface Serializer<TInput = any, TOutput = any> {
3 serialize(value: TInput): TOutput;
4}
5export declare type ProducerSerializer = Serializer<OutgoingEvent | OutgoingRequest, any>;
6export declare type ConsumerSerializer = Serializer<OutgoingResponse, any>;