Sfoglia il codice sorgente

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

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

* fix: Revert indentation changes
Jonathan Bones 5 anni fa
parent
commit
e529fa9006
1 ha cambiato i file con 3 aggiunte e 12 eliminazioni
  1. 3
    12
      src/WebViewTypes.ts

+ 3
- 12
src/WebViewTypes.ts Vedi File

@@ -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