Browse Source

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

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

* fix: Revert indentation changes
Jonathan Bones 5 years ago
parent
commit
e529fa9006
1 changed files with 3 additions and 12 deletions
  1. 3
    12
      src/WebViewTypes.ts

+ 3
- 12
src/WebViewTypes.ts View File

12
   NativeScrollEvent,
12
   NativeScrollEvent,
13
 } from 'react-native';
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
 export interface RNCWebViewUIManager extends UIManagerStatic {
17
 export interface RNCWebViewUIManager extends UIManagerStatic {
27
   getViewManagerConfig: (
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