-
Notifications
You must be signed in to change notification settings - Fork 35
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
TypeScript definitions in repo do not match with latest version on npm #28
Comments
Hey Alex, unfortunately, it has been this way for a while. I've been trying to contact the maintainer, @donavon for around 2 months now. I will publish my fork on npm later today. In the meantime, you could use some ugly type assertions to get your code to compile. |
Thanks for the fast answer @srmagura ! Ah, I didn't know there was an issue with the maintenance of this project. No worries about npm publishing though. For the time being, I simply do a cast to |
Sounds good. For anyone else looking at this, I have published the project with up-to-date TypeScript definitions at @srmagura/use-event-listener. |
deployed to npm as |
Expected behavior
When installing the latest version of
@use-it/event-listener
from npm, the TypeScript definitions should be the same as in the latest repo version (7fd6e56#diff-88bec6beae84369c0376b56b3bb88fe1).Actual behavior
When installing
@use-it/event-listener@0.1.3
from npm, the package contains older TypeScript definitions (8494f30#diff-88bec6beae84369c0376b56b3bb88fe1). On top of that, it seems to me that they are incorrect. Since the hook uses a native host functionality to subscribe to DOM events, the type for a received should not beSyntheticEvent
.Resolution
Is it possible to release a newer version to npm with the updated TypeScript definitions?
The text was updated successfully, but these errors were encountered: