Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Typing Custom Events #1135

Open
IrvingArmenta opened this issue Jun 14, 2023 · 0 comments
Open

Typing Custom Events #1135

IrvingArmenta opened this issue Jun 14, 2023 · 0 comments

Comments

@IrvingArmenta
Copy link

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`

@MartinCupela MartinCupela added question Further information is requested Feature Request and removed Feature Request question Further information is requested labels Aug 26, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants