-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interface 'IMidiPermissionDescriptor' incorrectly extends interface 'PermissionDescriptor' #2092
Comments
We're also seeing this in react-use/src/usePermission.ts Lines 11 to 19 in 2cd9128
That points us to #2063. @gelove what would be the right solution? It’s strange that
That excludes interface IMidiPermissionDescriptor extends Omit<PermissionDescriptor, "name"> {
name: 'midi';
sysex?: boolean;
}
interface IDevicePermissionDescriptor extends Omit<PermissionDescriptor, "name"> {
name: 'camera' | 'microphone' | 'speaker';
deviceId?: string;
} Would that be semantically correct? |
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 |
@scvnathan sounds reasonable! Would you be willing to submit a PR? 👍 We can place |
Sure, I can submit a PR 👍 |
Hi! @react-hookz/web, the new library by one of For those interested, there's an official migration guide for migrating from react-use to @react-hookz/web. |
Is this library offically unmaintained now? This bug is blocking our build pipelines - we can put in workarounds for now but it's not ideal. |
@leepowelldev Unfortunately this library is not "officially unmaintained", as no one has been able to establish contact with @streamich (the project owner). As far as I can tell, every couple months he appears, accepts a PR or two, then disappears again. Personally, I tried contacting him multiple times to see if I could help with the project backlog. No luck. So I'd say this project is "for all intents and purposes, unmaintained". |
@JoeDuncko Sure. Kind of annoying as I'd happily move to @react-hookz/web, but the reality is many of the hooks we use in this library are not yet implemented. |
If you compile a list of |
@JoeDuncko - thanks for this, just gone through and seems the only one we're missing that would allow us to migrate is |
Awesome! I don't think we have it actively in the works, so a PR would be appreciated! |
@kachkaev Hello, Is there a plan to merge the PR and release a new version? |
@Rey-Wang I believe that #2101 should fix this issue. I am able to merge the PR, but only @streamich can publish a new version of |
I just started using this lib and ran into this build problem (annoyingly I don't even use |
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. |
Thanks! |
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:
react-use
:The text was updated successfully, but these errors were encountered: