Skip to content

Commit

Permalink
correct typing of DraggableEventHandler (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis authored and STRML committed Dec 21, 2018
1 parent ed301b2 commit 96486ca
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ declare module 'react-draggable' {
position: ControlPosition
}

export type DraggableEventHandler = (e: React.MouseEvent<HTMLElement> | React.TouchEvent<HTMLElement>, data: DraggableData) => void | false;
export type DraggableEventHandler = (
e: React.MouseEvent<HTMLElement | SVGElement>
| React.TouchEvent<HTMLElement | SVGElement>
| MouseEvent
| TouchEvent,
data: DraggableData
) => void | false;

export interface DraggableData {
node: HTMLElement,
Expand Down

0 comments on commit 96486ca

Please sign in to comment.