소스 검색

fix: onScroll type definition properly

HYUNGU, KANG 4 년 전
부모
커밋
5f1363644e
No account linked to committer's email address
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2
    2
      src/WebViewTypes.ts

+ 2
- 2
src/WebViewTypes.ts 파일 보기

@@ -219,7 +219,7 @@ export interface CommonNativeWebViewProps extends ViewProps {
219 219
   injectedJavaScriptBeforeContentLoaded?: string;
220 220
   mediaPlaybackRequiresUserAction?: boolean;
221 221
   messagingEnabled: boolean;
222
-  onScroll?: (event: NativeScrollEvent) => void;
222
+  onScroll?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
223 223
   onLoadingError: (event: WebViewErrorEvent) => void;
224 224
   onLoadingFinish: (event: WebViewNavigationEvent) => void;
225 225
   onLoadingProgress: (event: WebViewProgressEvent) => void;
@@ -627,7 +627,7 @@ export interface WebViewSharedProps extends ViewProps {
627 627
   /**
628 628
    * Function that is invoked when the `WebView` scrolls.
629 629
    */
630
-  onScroll?: (event: NativeScrollEvent) => void;
630
+  onScroll?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
631 631
 
632 632
   /**
633 633
    * Function that is invoked when the `WebView` has finished loading.