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

+ 1
- 1
package.json View File

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