Skip to content
New issue

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

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

Already on GitHub? Sign in 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`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants