Skip to content

Commit

Permalink
fix: Wrap CustomEventHandler with CustomEvent (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
RedPhoenixQ committed Mar 13, 2024
1 parent 1095389 commit 92e382a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/nine-carpets-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"bits-ui": patch
---

fix: Event type for `CustomEventHandler` (#389)
4 changes: 2 additions & 2 deletions src/lib/helpers/event-handlers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type CustomEventHandler<T extends Event = Event, M extends Element = Element> = T & {
export type CustomEventHandler<T extends Event = Event, M extends Element = Element> = CustomEvent<{
currentTarget: EventTarget & M;
originalEvent: T;
};
}>;

0 comments on commit 92e382a

Please sign in to comment.