瀏覽代碼

fix(deps): Fix RNCWebViewUIManager interface typescript error (#… (#928)

* fix(deps): Fix RNCWebViewUIManager interface typescript error (#901)

* fix: Revert indentation changes
Jonathan Bones 5 年之前
父節點
當前提交
e529fa9006
共有 1 個檔案被更改,包括 3 行新增12 行删除
  1. 3
    12
      src/WebViewTypes.ts

+ 3
- 12
src/WebViewTypes.ts 查看文件

@@ -12,22 +12,13 @@ import {
12 12
   NativeScrollEvent,
13 13
 } from 'react-native';
14 14
 
15
-export interface WebViewCommands {
16
-  goForward: number;
17
-  goBack: number;
18
-  reload: number;
19
-  stopLoading: number;
20
-  postMessage: number;
21
-  injectJavaScript: number;
22
-  loadUrl: number;
23
-  requestFocus: number;
24
-}
15
+type WebViewCommands = 'goForward' | 'goBack' | 'reload' | 'stopLoading' | 'postMessage' | 'injectJavaScript' | 'loadUrl' | 'requestFocus';
25 16
 
26 17
 export interface RNCWebViewUIManager extends UIManagerStatic {
27 18
   getViewManagerConfig: (
28
-    name: 'RNCWebView',
19
+    name: string,
29 20
   ) => {
30
-    Commands: WebViewCommands;
21
+    Commands: { [key in WebViewCommands]: number };
31 22
   };
32 23
 }
33 24