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

Improve type for userEvent of createDOM #4062

Merged
merged 1 commit into from
May 5, 2023

Conversation

ahnpnl
Copy link
Contributor

@ahnpnl ahnpnl commented May 4, 2023

What is it?

  • Feature / enhancement
  • Bug
  • Docs / tests / types / typos

Description

Currently, when using userEvent, it's not so convenient that devs don't know which native HTML element tags are available as well as available DOM events.

This PR will provide better typing that:

  • queryOrElement can give suggestion about all available HTML tags
  • eventNameCamel can give suggestion about all existing DOM events

Checklist:

  • My code follows the developer guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • Added new tests to cover the fix / functionality

@stackblitz
Copy link

stackblitz bot commented May 4, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@ahnpnl ahnpnl marked this pull request as ready for review May 4, 2023 19:23
@ahnpnl
Copy link
Contributor Author

ahnpnl commented May 4, 2023

Not sure why build failed with error which doesn't seem to be related to the change

@zanettin
Copy link
Collaborator

zanettin commented May 4, 2023

Hi @ahnpnl 👋
The CI is failing, because you've changed the API but didn't run pnpm api.update 😄
thb i am not sure about this changes so i leave it to the core team. thanks for your contribution and patience 🙏

@ahnpnl ahnpnl force-pushed the improve-create-dom-type branch 2 times, most recently from c4c65f8 to 6ba5c5e Compare May 4, 2023 21:53
This will provide better typing that:
- `queryOrElement` can give suggestion about all available HTML tags
- `eventNameCamel` can give suggestion about all existing DOM events
@adamdbradley adamdbradley merged commit 82ea8b8 into QwikDev:main May 5, 2023
19 checks passed
@adamdbradley
Copy link
Contributor

awesome thank you!

@ahnpnl ahnpnl deleted the improve-create-dom-type branch May 5, 2023 15:32
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.

None yet

3 participants