( channel: Channel, type: keyof IPublishChannels[Channel], event: IPublishChannels[Channel][typeof type], multi?: ReturnType<Redis['multi']>, )
| 25 | } |
| 26 | |
| 27 | export function publishEvent<Channel extends keyof IPublishChannels>( |
| 28 | channel: Channel, |
| 29 | type: keyof IPublishChannels[Channel], |
| 30 | event: IPublishChannels[Channel][typeof type], |
| 31 | multi?: ReturnType<Redis['multi']>, |
| 32 | ) { |
| 33 | const redis = multi ?? getRedisPub(); |
| 34 | return redis.publish(getSubscribeChannel(channel, type), setSuperJson(event)); |
| 35 | } |
| 36 | |
| 37 | export function parsePublishedEvent<Channel extends keyof IPublishChannels>( |
| 38 | _channel: Channel, |
no test coverage detected