瀏覽代碼

Add type definitions for style prop

Nick Redmond 6 年之前
父節點
當前提交
825fd2e993
共有 1 個檔案被更改,包括 5 行新增0 行删除
  1. 5
    0
      src/index.d.ts

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

@@ -10,6 +10,7 @@
10 10
 
11 11
 declare module 'react-native-view-shot' {
12 12
     import { Component, ReactInstance } from 'react'
13
+    import { StyleObj } from 'react-native/Libraries/StyleSheet/StyleSheetTypes'
13 14
 
14 15
     export interface CaptureOptions {
15 16
         /**
@@ -66,6 +67,10 @@ declare module 'react-native-view-shot' {
66 67
          * @param {Error} error
67 68
          */
68 69
         onCaptureFailure?(error: Error): void;
70
+        /**
71
+         * style prop as StyleObj
72
+         */
73
+        style?: StyleObj;
69 74
     }
70 75
 
71 76
     export default class ViewShot extends Component<ViewShotProperties> {