Skip to content

Commit cc7b4f1

Browse files
authored
(fix) event target is not known
The target of bubbling events cannot be assumed. Use `currentTarget` instead. #579
1 parent 354432a commit cc7b4f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/svelte2tsx/svelte-jsx.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
//
4040
// Event Handler Types
4141
// ----------------------------------------------------------------------
42-
type EventHandler<E = Event, T = HTMLElement> = (event: E & { target: EventTarget & T}) => any;
42+
type EventHandler<E = Event, T = HTMLElement> = (event: E & { currentTarget: EventTarget & T}) => any;
4343

4444
type ClipboardEventHandler<T> = EventHandler<ClipboardEvent, T>;
4545
type CompositionEventHandler<T> = EventHandler<CompositionEvent, T>;

0 commit comments

Comments
 (0)