UNPKG

@nestjs/microservices

Version:

Nest - modern, fast, powerful node.js web framework (@microservices)

10 lines (9 loc) 422 B
import { IncomingEvent, IncomingRequest, IncomingResponse } from './packet.interface'; /** * @publicApi */ export interface Deserializer<TInput = any, TOutput = any> { deserialize(value: TInput, options?: Record<string, any>): TOutput | Promise<TOutput>; } export type ProducerDeserializer = Deserializer<any, IncomingResponse>; export type ConsumerDeserializer = Deserializer<any, IncomingRequest | IncomingEvent>;