Преглед изворни кода

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