You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
node_modules/react-use/lib/useWait.d.ts:1:33 - error TS7016: Could not find a declaration file for module 'react-wait'.
'....../node_modules/react-wait/dist/react-wait.js' implicitly has an 'any' type.
Try `npm install @types/react-wait` if it exists or add a new declaration (.d.ts) file containing `declare module 'react-wait';`
1 import { useWait, Waiter } from 'react-wait';
~~~~~~~~~~~~
Steps to reproduce it and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have extra dependencies other than react-use. Paste the link to your JSFiddle or CodeSandbox example below:
Contrary to the expected some TypeScript types should be included as dependencies. This is the case with react-wait on which typings for node_modules/react-use/lib/useWait.d.ts depend (so it should indeed be included as dependency, not devDependency). More on that can be found in TypeScript handbook.
Simply reverting 49372ac should be enough to make things work again 😄
What is the current behavior?
TypeScript build fails with error:
Steps to reproduce it and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have extra dependencies other than
react-use
. Paste the link to your JSFiddle or CodeSandbox example below:What is the expected behavior?
Contrary to the expected some TypeScript types should be included as
dependencies
. This is the case withreact-wait
on which typings fornode_modules/react-use/lib/useWait.d.ts
depend (so it should indeed be included as dependency, not devDependency). More on that can be found in TypeScript handbook.Simply reverting 49372ac should be enough to make things work again 😄
A little about versions:
react-use
: 12.2.3@types/react-wait
should be in devDependencies #644 was implemented) - 12.2.2 does not have the errorThe text was updated successfully, but these errors were encountered: