( name: K, factory: () => ChannelEvents[K] )
| 259 | } |
| 260 | |
| 261 | export function publish<K extends keyof ChannelEvents>( |
| 262 | name: K, |
| 263 | factory: () => ChannelEvents[K] |
| 264 | ): void { |
| 265 | const ch = pointChannels?.[name]; |
| 266 | if (ch?.hasSubscribers) { |
| 267 | ch.publish(factory()); |
| 268 | } |
| 269 | } |
no test coverage detected