MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / parsePublishedEvent

Function parsePublishedEvent

packages/redis/publisher.ts:37–43  ·  view source on GitHub ↗
(
  _channel: Channel,
  _type: keyof IPublishChannels[Channel],
  message: string,
)

Source from the content-addressed store, hash-verified

35}
36
37export function parsePublishedEvent<Channel extends keyof IPublishChannels>(
38 _channel: Channel,
39 _type: keyof IPublishChannels[Channel],
40 message: string,
41): IPublishChannels[Channel][typeof _type] {
42 return getSuperJson<IPublishChannels[Channel][typeof _type]>(message)!;
43}
44
45export function subscribeToPublishedEvent<
46 Channel extends keyof IPublishChannels,

Callers 1

messageFunction · 0.85

Calls 1

getSuperJsonFunction · 0.90

Tested by

no test coverage detected