Skip to content

Add Typescript types definition for all hooks #206

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

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

toystars
Copy link
Contributor

Thanks for the awesome library. Saves lots of time from writing these hooks from scratch. I was a little bit disappointed there weren't Typescript type definitions and had to add declarations for the few hooks I am currently using. So I added types for all the hooks in the library (excluding the experimental hooks).

@vercel
Copy link

vercel bot commented Jul 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
usehooks ✅ Ready (Inspect) Visit Preview Jul 13, 2023 11:17pm

@joaopcm
Copy link

joaopcm commented Jul 18, 2023

Please! You're our hero :)

Copy link

@joaopcm joaopcm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats! This is not only a PR, it's an art! ⭐


external-content duckduckgo com

“I once saw him kill three men in a bar... With a pencil.”

@fionnachan
Copy link

would love to see this in a release soon!! <3
hope the maintainers can merge it asap

@rlesniak
Copy link

wen release

@Waryen
Copy link

Waryen commented Jul 26, 2023

Nice job! But I have a proposal, why not rewrite the hooks with TypeScript? I believe this could bring a better DX, I'm open to work on it if this is wanted

@ariesclark
Copy link

Nice job! But I have a proposal, why not rewrite the hooks with TypeScript? I believe this could bring a better DX, I'm open to work on it if this is wanted

I feel like this is more work than it's worth right now, this solution is a stop-gap solution in the meanwhile and it should be merged.

@Waryen
Copy link

Waryen commented Jul 26, 2023

Nice job! But I have a proposal, why not rewrite the hooks with TypeScript? I believe this could bring a better DX, I'm open to work on it if this is wanted

I feel like this is more work than it's worth right now, this solution is a stop-gap solution in the meanwhile and it should be merged.

I agree, this should be merged first in the meantime.

@ariesclark
Copy link

Or consider using https://usehooks-ts.com/.

@Waryen
Copy link

Waryen commented Jul 28, 2023

Or consider using https://usehooks-ts.com/.

It seems to be a good alternative with TS indeed

@toystars
Copy link
Contributor Author

Nice job! But I have a proposal, why not rewrite the hooks with TypeScript? I believe this could bring a better DX, I'm open to work on it if this is wanted

I 100% agree this would be the ideal approach but I wanted something quick to start with just as @ariesclark highlighted as well. I can take some time over the weekend to re-write the hooks with Typescript.

@AmagiDDmxh
Copy link

wen merge ser?

@tylermcginnis tylermcginnis merged commit f5c7059 into uidotdev:main Aug 10, 2023
@tylermcginnis
Copy link
Collaborator

Sorry for the delay everyone. Merged. Thank you @toystars!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants