Browse Source

fix(typings): incorrect package.json + fix d.ts(#453)

* fix(typings): fix syntax of main d.ts file

* fix(typings): point typings field in package.json to actual d.ts file
Vladimir Timofeev 5 years ago
parent
commit
e2adacc977
2 changed files with 3 additions and 3 deletions
  1. 2
    2
      index.d.ts
  2. 1
    1
      package.json

+ 2
- 2
index.d.ts View File

2
 // eslint-disable-next-line
2
 // eslint-disable-next-line
3
 import { IOSWebViewProps, AndroidWebViewProps } from './lib/WebViewTypes';
3
 import { IOSWebViewProps, AndroidWebViewProps } from './lib/WebViewTypes';
4
 
4
 
5
-class WebView extends Component<IOSWebViewProps & AndroidWebViewProps> {
5
+declare class WebView extends Component<IOSWebViewProps & AndroidWebViewProps> {
6
     /**
6
     /**
7
      * Go back one page in the webview's history.
7
      * Go back one page in the webview's history.
8
      */
8
      */
32
      * Executes the JavaScript string.
32
      * Executes the JavaScript string.
33
      */
33
      */
34
     injectJavaScript: (script: string) => void;
34
     injectJavaScript: (script: string) => void;
35
-};
35
+}
36
 
36
 
37
 export {WebView};
37
 export {WebView};
38
 export default WebView;
38
 export default WebView;

+ 1
- 1
package.json View File

2
   "name": "react-native-webview",
2
   "name": "react-native-webview",
3
   "description": "React Native WebView component for iOS, Android, and Windows 10 (coming soon)",
3
   "description": "React Native WebView component for iOS, Android, and Windows 10 (coming soon)",
4
   "main": "index.js",
4
   "main": "index.js",
5
-  "typings": "typings/index.d.ts",
5
+  "typings": "index.d.ts",
6
   "author": "Jamon Holmgren <jamon@infinite.red>",
6
   "author": "Jamon Holmgren <jamon@infinite.red>",
7
   "contributors": [
7
   "contributors": [
8
     "Thibault Malbranche <malbranche.thibault@gmail.com>"
8
     "Thibault Malbranche <malbranche.thibault@gmail.com>"