stream-chat-js icon indicating copy to clipboard operation
stream-chat-js copied to clipboard

Typing Custom Events

Open IrvingArmenta opened this issue 2 years ago • 0 comments

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`

IrvingArmenta avatar Jun 14 '23 04:06 IrvingArmenta