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

Type definitions for JSX attributes and events #1007

Open
littlespex opened this issue Oct 12, 2024 · 0 comments
Open

Type definitions for JSX attributes and events #1007

littlespex opened this issue Oct 12, 2024 · 0 comments

Comments

@littlespex
Copy link
Collaborator

The react build script generates types for the media-chrome web components based on GenericForwardRef. While this provides basic typing it doesn't provide definitions for the component's attributes, or React style event handlers (React's onClick vs the DOM onclick). This prevents strict type checking and code completion/hints:

Image

vs

Image

If possible, it would improve DX if each component's attributes were added to the JSX namespace.

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

No branches or pull requests

1 participant