From b43f7f859482b622ffe7e8a54dc7104171995678 Mon Sep 17 00:00:00 2001 From: Spencer Elliott Date: Fri, 12 Jul 2019 14:45:12 -0400 Subject: [PATCH 1/2] Add dependency "@types/react-wait" Fixes #306 --- package.json | 1 + yarn.lock | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 9db28a32df..f3c26fb798 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ }, "homepage": "https://github.com/streamich/react-use#readme", "dependencies": { + "@types/react-wait": "^0.3.0", "copy-to-clipboard": "^3.1.0", "nano-css": "^5.1.0", "react-fast-compare": "^2.0.4", diff --git a/yarn.lock b/yarn.lock index e0c1f70f85..546938cf2b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2701,7 +2701,14 @@ resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.2.tgz#690a1475b84f2a884fd07cd797c00f5f31356ea8" integrity sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw== -"@types/react@16.8.23": +"@types/react-wait@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@types/react-wait/-/react-wait-0.3.0.tgz#6f7ef17571a17e72c7864ede8cf7d3aa525a005e" + integrity sha512-5jIfDcHRjqeE7QfZG7kCqOpfrPSvOM1E3/nlKuJ/NZrG/WrhLo/AFr0i72jhTWzyNRo4ex0pshBaiCHksZXH3A== + dependencies: + "@types/react" "*" + +"@types/react@*", "@types/react@16.8.23": version "16.8.23" resolved "https://registry.yarnpkg.com/@types/react/-/react-16.8.23.tgz#ec6be3ceed6353a20948169b6cb4c97b65b97ad2" integrity sha512-abkEOIeljniUN9qB5onp++g0EY38h7atnDHxwKUFz1r3VH1+yG1OKi2sNPTyObL40goBmfKFpdii2lEzwLX1cA== From 38622ec5a6d1cd371e7bbdaaae2f41e983fe227e Mon Sep 17 00:00:00 2001 From: Spencer Elliott Date: Wed, 17 Jul 2019 10:41:20 -0400 Subject: [PATCH 2/2] Export useWait and Waiter --- src/index.ts | 3 ++- src/useWait.ts | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index dd3723874f..0f06d92c03 100644 --- a/src/index.ts +++ b/src/index.ts @@ -71,7 +71,7 @@ import useUnmount from './useUnmount'; import useUpdate from './useUpdate'; import useUpdateEffect from './useUpdateEffect'; import useVideo from './useVideo'; -import useWait from './useWait'; +import { useWait, Waiter } from './useWait'; import useWindowScroll from './useWindowScroll'; import useWindowSize from './useWindowSize'; @@ -152,4 +152,5 @@ export { useWait, useWindowScroll, useWindowSize, + Waiter, }; diff --git a/src/useWait.ts b/src/useWait.ts index cacd6787b5..cb49802a36 100644 --- a/src/useWait.ts +++ b/src/useWait.ts @@ -1,5 +1,3 @@ import { useWait, Waiter } from 'react-wait'; -useWait.Waiter = Waiter; - -export default useWait; +export { useWait, Waiter };