stream-chat-js
stream-chat-js copied to clipboard
Typing Custom Events
I am trying to correctly type events to use them in both channel.sendEvent({ type: 'HERE' }) and in channel.on('HERE')
I am following the docs written about typescript, extending the ExtendableGenerics with UR (Record<string, unkown>)
But I keep getting channel.sendEvent({ type: 'HERE' }) to type being not defined.
I see that EventType has no way of extend it or make it generic, and is typed by the keys of EVENT_MAP.
What is the proper way to update EventType to my needs? for Custom Events`