react-use: Interface 'IMidiPermissionDescriptor' incorrectly extends interface 'PermissionDescriptor'
What is the current behavior?

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?
A little about versions:
- OS:
- Browser (vendor and version):
- React:
react-use:- Did this worked in the previous package version?
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 16
- Comments: 16 (3 by maintainers)
Commits related to this issue
- Switch from unmaintained `react-use` lib to `@react-hookz/web` See https://react-hookz.github.io/web/?path=/docs/migrating-from-react-use--page See https://github.com/streamich/react-use/issues/2092... — committed to prezly/content-renderer-react-js by e1himself 3 years ago
- fix: typecheck error on react-use https://github.com/streamich/react-use/issues/2092 — committed to mystster/tinyglobe by mystster 2 years ago
- Switch from unmaintained `react-use` lib to `@react-hookz/web` See https://react-hookz.github.io/web/?path=/docs/migrating-from-react-use--page See https://github.com/streamich/react-use/issues/2092... — committed to prezly/theme-kit-js by riffbyte 2 years ago
As a workaround to this you can change your imports to direct imports:
As long as you’re not using usePermission you can stop the build issue. You can migrate to new library as they become available or start to write your own replacements.
Hi! @react-hookz/web, the new library by one of
react-use’s former maintainers (background here and here) has resolved this outstanding type issue. It might be worth taking a look.For those interested, there’s an official migration guide for migrating from react-use to @react-hookz/web.
I’ve tested this out with TS 4.4 and this works too: https://gist.github.com/scvnathan/e9ff3a784fda80b408f514ab6f3acc68
I’m guessing these permission types are experimental so the TS team removed them