UNPKG

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