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

Add TypeScript union string type for custom event names #2139

Merged
merged 1 commit into from
Jan 2, 2024
Merged

Add TypeScript union string type for custom event names #2139

merged 1 commit into from
Jan 2, 2024

Conversation

cngJo
Copy link
Contributor

@cngJo cngJo commented Dec 28, 2023

Description

This adds more type-safety to extension developers, since the event name in onEvent is now no longer of type string, but uses a. new union-type of all available event names as string.

The type and the available events are based on what's written in the docs.

Corresponding issue: there is no issue atm. please let me know when I should create one.

Testing

This only changes the type definition, not the actual source-code, therefore no tests are provided.

Checklist

  • I have read the contribution guidelines
  • I have targeted this PR against the correct branch (master for website changes, dev for
    source changes)
  • This is either a bugfix, a documentation update, or a new feature that has been explicitly
    approved via an issue
  • I ran the test suite locally (npm run test) and verified that it succeeded

Copy link
Collaborator

@alexpetros alexpetros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@alexpetros alexpetros merged commit ca0966f into bigskysoftware:dev Jan 2, 2024
1 check passed
@cngJo cngJo deleted the add-type-for-htmx-event branch January 2, 2024 09:18
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