Browse Source

Fix onScroll event type

Nizomiddin Toshpulatov 4 years ago
parent
commit
030d96bf65
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      src/WebViewTypes.ts

+ 4
- 2
src/WebViewTypes.ts View File

167
 
167
 
168
 export type WebViewRenderProcessGoneEvent = NativeSyntheticEvent<WebViewRenderProcessGoneDetail>;
168
 export type WebViewRenderProcessGoneEvent = NativeSyntheticEvent<WebViewRenderProcessGoneDetail>;
169
 
169
 
170
+export type WebViewScrollEvent = NativeSyntheticEvent<NativeScrollEvent>;
171
+
170
 export type DataDetectorTypes =
172
 export type DataDetectorTypes =
171
   | 'phoneNumber'
173
   | 'phoneNumber'
172
   | 'link'
174
   | 'link'
259
   javaScriptCanOpenWindowsAutomatically?: boolean;
261
   javaScriptCanOpenWindowsAutomatically?: boolean;
260
   mediaPlaybackRequiresUserAction?: boolean;
262
   mediaPlaybackRequiresUserAction?: boolean;
261
   messagingEnabled: boolean;
263
   messagingEnabled: boolean;
262
-  onScroll?: (event: NativeScrollEvent) => void;
264
+  onScroll?: (event: WebViewScrollEvent) => void;
263
   onLoadingError: (event: WebViewErrorEvent) => void;
265
   onLoadingError: (event: WebViewErrorEvent) => void;
264
   onLoadingFinish: (event: WebViewNavigationEvent) => void;
266
   onLoadingFinish: (event: WebViewNavigationEvent) => void;
265
   onLoadingProgress: (event: WebViewProgressEvent) => void;
267
   onLoadingProgress: (event: WebViewProgressEvent) => void;
905
   /**
907
   /**
906
    * Function that is invoked when the `WebView` scrolls.
908
    * Function that is invoked when the `WebView` scrolls.
907
    */
909
    */
908
-  onScroll?: (event: NativeScrollEvent) => void;
910
+  onScroll?: (event: WebViewScrollEvent) => void;
909
 
911
 
910
   /**
912
   /**
911
    * Function that is invoked when the `WebView` has finished loading.
913
    * Function that is invoked when the `WebView` has finished loading.