소스 검색

type: fix for typescript (add missing type)

Add `number` to first argument of `captureRef()` as original flowtyped typing
Ken 4 년 전
부모
커밋
97d6c98537
No account linked to committer's email address
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2
    2
      src/index.d.ts

+ 2
- 2
src/index.d.ts 파일 보기

@@ -81,11 +81,11 @@ declare module 'react-native-view-shot' {
81 81
     /**
82 82
      * lower level imperative API
83 83
      *
84
-     * @param {React.ReactInstance | RefObject} viewRef
84
+     * @param {number | React.ReactInstance | RefObject} viewRef
85 85
      * @param {"react-native-view-shot".CaptureOptions} options
86 86
      * @return {Promise<string>} Returns a Promise of the image URI.
87 87
      */
88
-    export function captureRef<T>(viewRef: ReactInstance | RefObject<T>, options?: CaptureOptions): Promise<string>
88
+    export function captureRef<T>(viewRef: number | ReactInstance | RefObject<T>, options?: CaptureOptions): Promise<string>
89 89
 
90 90
     /**
91 91
      * This method release a previously captured uri. For tmpfile it will clean them out, for other result types it