htmx icon indicating copy to clipboard operation
htmx copied to clipboard

Add TypeScript union string type for custom event names

Open cngJo opened this issue 2 years ago • 0 comments

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

  • [x] I have read the contribution guidelines
  • [x] 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

cngJo avatar Dec 28 '23 21:12 cngJo