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

return proxy in js __makeEvents__ #154

Merged
merged 1 commit into from
Jan 19, 2025

Conversation

adlrwbr
Copy link
Contributor

@adlrwbr adlrwbr commented Jan 15, 2025

Hello!

This is a small inconsistency between event handling on JS vs TS that results in TypeError: undefined is not an object (evaluating 'events.myEvent.listen') on JS.

Compare with the typescript version:

get: (_, event) => {
const name = mappings[event as keyof T];
return new Proxy((() => {}) as any, {

@adlrwbr adlrwbr changed the title return proxy in jsdoc __makeEvents__ return proxy in js __makeEvents__ Jan 15, 2025
@oscartbeaumont oscartbeaumont merged commit 89b7abe into specta-rs:main Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants