浏览代码

Merge pull request #259 from ken0x0a/patch-1

type: fix for typescript (add missing type)
Gaëtan Renaudeau 5 年前
父节点
当前提交
ad9a536b89
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      src/index.d.ts

+ 2
- 2
src/index.d.ts 查看文件

81
     /**
81
     /**
82
      * lower level imperative API
82
      * lower level imperative API
83
      *
83
      *
84
-     * @param {React.ReactInstance | RefObject} viewRef
84
+     * @param {number | React.ReactInstance | RefObject} viewRef
85
      * @param {"react-native-view-shot".CaptureOptions} options
85
      * @param {"react-native-view-shot".CaptureOptions} options
86
      * @return {Promise<string>} Returns a Promise of the image URI.
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
      * This method release a previously captured uri. For tmpfile it will clean them out, for other result types it
91
      * This method release a previously captured uri. For tmpfile it will clean them out, for other result types it