Permalink
Browse files

RN: Create SyntheticEvent and ScrollEvent Types

Reviewed By: sahrens

Differential Revision: D6720478

fbshipit-source-id: b542bd50db7cd7085aecce8b986c6922bfb24a43
  • Loading branch information...
yungsters authored and facebook-github-bot committed Jan 14, 2018
1 parent c355a34 commit 83ed9d170b8fd750a345fc608ec69db2fe3ca9b2
Showing with 41 additions and 1 deletion.
  1. +41 −1 Libraries/Types/CoreEventTypes.js
@@ -26,4 +26,44 @@ export type LayoutEvent = {|
+persist: () => void,
|};
export type PressEvent = Object;
export type SyntheticEvent<T> = {|
+bubbles: ?boolean,
+cancelable: ?boolean,
+currentTarget: number,
+defaultPrevented: ?boolean,
+dispatchConfig: {|
+registrationName: string,
|},
+eventPhase: ?number,
+isDefaultPrevented: () => boolean,
+isPropagationStopped: () => boolean,
+isTrusted: ?boolean,
+nativeEvent: T,
+target: ?number,
+timeStamp: number,
+type: ?string,
|};
export type PressEvent = SyntheticEvent<Object>;
export type ScrollEvent = SyntheticEvent<{|
+contentInset: {|
+bottom: number,
+left: number,
+right: number,
+top: number,
|},
+contentOffset: {|
+y: number,
+x: number,
|},
+contentSize: {|
+height: number,
+width: number,
|},
+layoutMeasurement: {|
+height: number,
+width: number,
|},
+zoomScale: number,
|}>;

0 comments on commit 83ed9d1

Please sign in to comment.