From c8de953dfe90f2cbb418164f17c1c8ee8eef48ec Mon Sep 17 00:00:00 2001 From: Jared Palmer Date: Fri, 9 Feb 2018 19:58:03 -0500 Subject: [PATCH] CLose #421. Remove @types/react-native. Sorry kids! --- package.json | 1 - src/formik.tsx | 10 +++------- tsconfig.base.json | 15 +-------------- yarn.lock | 6 ------ 4 files changed, 4 insertions(+), 28 deletions(-) diff --git a/package.json b/package.json index 462fd2297..ef9401047 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,6 @@ "@types/prop-types": "15.5.1", "@types/react": "16.0.28", "@types/react-dom": "^16.0.3", - "@types/react-native": "^0.52.8", "@types/react-test-renderer": "15.5.2", "@types/warning": "^3.0.0", "all-contributors-cli": "^4.4.0", diff --git a/src/formik.tsx b/src/formik.tsx index b72e6e475..01f1ddf94 100644 --- a/src/formik.tsx +++ b/src/formik.tsx @@ -2,7 +2,7 @@ import * as PropTypes from 'prop-types'; import * as React from 'react'; import isEqual from 'lodash.isequal'; import warning from 'warning'; -import { GestureResponderEvent } from 'react-native'; + import { isFunction, isPromise, @@ -158,9 +158,7 @@ export interface FormikActions { */ export interface FormikHandlers { /** Form submit handler */ - handleSubmit: ( - e: React.FormEvent | GestureResponderEvent - ) => void; + handleSubmit: (e: React.FormEvent) => void; /** Classic React change handler, keyed by input name */ handleChange: (e: React.ChangeEvent) => void; /** Mark input as touched */ @@ -464,9 +462,7 @@ export class Formik extends React.Component< ); }; - handleSubmit = ( - e: React.FormEvent | GestureResponderEvent - ) => { + handleSubmit = (e: React.FormEvent) => { e.preventDefault(); this.submitForm(); }; diff --git a/tsconfig.base.json b/tsconfig.base.json index 99d59858c..05aed5dbc 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -23,20 +23,7 @@ "strict": true, "strictNullChecks": true, "stripInternal": true, - "target": "es5", - "types": [ - "react", - "react-native", - "jest", - "prop-types", - "enzyme", - "enzyme-adapter-react-16", - "lodash.clonedeep", - "lodash.isequal", - "lodash.topath", - "warning", - "react-test-renderer" - ] + "target": "es5" }, "include": ["src", "./typings.d.ts"], "exclude": ["node_modules", "dist"] diff --git a/yarn.lock b/yarn.lock index 216f8428a..7f8f86435 100644 --- a/yarn.lock +++ b/yarn.lock @@ -60,12 +60,6 @@ "@types/node" "*" "@types/react" "*" -"@types/react-native@^0.52.8": - version "0.52.8" - resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.52.8.tgz#dd5aa7c4eb944d7c0b2b249a2bb811aa119f49c6" - dependencies: - "@types/react" "*" - "@types/react-test-renderer@15.5.2": version "15.5.2" resolved "https://registry.yarnpkg.com/@types/react-test-renderer/-/react-test-renderer-15.5.2.tgz#422a51a3a1750616f8ca5440d3591ab381d7f1e1"