Skip to content
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

fix(useDebounce): return type of callback #603

Merged
merged 2 commits into from
Oct 14, 2021

Conversation

krijoh92
Copy link
Contributor

@krijoh92 krijoh92 commented Oct 11, 2021

this way we the debounced function type is the same as the type of the callback we send in to useDebounce.

@codecov
Copy link

codecov bot commented Oct 11, 2021

Codecov Report

Merging #603 (e6c467b) into main (c669a8e) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #603      +/-   ##
==========================================
+ Coverage   73.75%   73.80%   +0.05%     
==========================================
  Files          67       67              
  Lines        1345     1344       -1     
  Branches      268      268              
==========================================
  Hits          992      992              
+ Misses        352      351       -1     
  Partials        1        1              
Impacted Files Coverage Δ
src/hooks/useDebounce.ts 100.00% <100.00%> (+6.66%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 665a780...e6c467b. Read the comment docs.

@krijoh92
Copy link
Contributor Author

krijoh92 commented Oct 11, 2021

After a bit more digging, this could also work (and it more accurately represents the return value)

Outdated comment :)

@krijoh92
Copy link
Contributor Author

I'm not 100% sure how to fix that build failure. Didn't seem like it originated from this code?

@imbhargav5
Copy link
Owner

This is an awesome PR @krijoh92 . 🙇🏽

@imbhargav5
Copy link
Owner

Me or @qiweiii will handle the build error @krijoh92 🔥

@krijoh92
Copy link
Contributor Author

Me or @qiweiii will handle the build error @krijoh92 🔥

Awesome!

@qiweiii
Copy link
Contributor

qiweiii commented Oct 13, 2021

@imbhargav5 build error is fixed!

@imbhargav5 imbhargav5 merged commit d8a2695 into imbhargav5:main Oct 14, 2021
@imbhargav5
Copy link
Owner

This is so nicely done @qiweiii @krijoh92 🙇🏽

@github-actions
Copy link
Contributor

🎉 This PR is included in version 5.7.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants