Skip to content

Commit

Permalink
Add definition for React DOM SyntheticPointerEvent
Browse files Browse the repository at this point in the history
This is based on facebook/react#12507 which is
seemingly missing a couple of fields from the official spec.
Consequently this will need an update once React supports all fields.
  • Loading branch information
motiz88 committed Aug 12, 2018
1 parent 75b45ee commit 4e8408a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/react-dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,19 @@ declare class SyntheticWheelEvent<
deltaZ: number;
}

declare class SyntheticPointerEvent<
+T: EventTarget = EventTarget,
> extends SyntheticMouseEvent<T> {
pointerId: number;
width: number;
height: number;
pressure: number;
tiltX: number;
tiltY: number;
pointerType: string;
isPrimary: boolean;
}

declare class SyntheticTouchEvent<
+T: EventTarget = EventTarget,
> extends SyntheticUIEvent<T> {
Expand Down

0 comments on commit 4e8408a

Please sign in to comment.