typealias ToEventMap

export type ToEventMap<TRecord extends Record<string, any[]>, TResponses extends Record<keyof TRecord, any> | undefined = undefined> = {  [TKey in keyof TRecord]: [    event: TResponses extends Record<keyof TRecord, any> ? {      ack(): Promise<void>;      reply(data: TResponses[TKey]): Promise<void>;    } : {      ack(): Promise<void>;      data: TRecord[TKey];    }  ];};

Type Parameters

TRecord extends Record<string, any[]>

optional
TResponses? extends Record<keyof TRecord, any> | undefined = undefined

Union Members

{ [TKey in keyof TRecord]: [ event: TResponses extends Record<keyof TRecord, any> ? { ack(): Promise<void>; reply(data: TResponses[TKey]): Promise<void>; } : { ack(): Promise<void>; data: TRecord[TKey]; } ];}