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

Feature request: typed inputs #399

Open
kubukoz opened this issue Sep 28, 2024 · 4 comments
Open

Feature request: typed inputs #399

kubukoz opened this issue Sep 28, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@kubukoz
Copy link
Contributor

kubukoz commented Sep 28, 2024

It would be amazing to have typed events for inputs. This is the tweet.

like, maybe type := "file" can carry a singleton type of "file" and this can somehow be used to derive a more specific type in onChange, like in typescript?

@faresbouzayen

This comment was marked as spam.

@kubukoz

This comment was marked as resolved.

@faresbouzayen

This comment was marked as spam.

@armanbilge armanbilge added the enhancement New feature or request label Sep 29, 2024
@armanbilge
Copy link
Owner

I think getting this to work with the generic syntax type := "file" may be more challenging ... but maybe we could add a custom builder to the DSL e.g. input["file"](...). I think we'd also need something like the changes I suggested #180, where attributes and events can be typed specifically according to the element type. This will help us better support Web Components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants