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: [1016] updated type definition of useForkRef with generic suppor… #1017

Merged
merged 4 commits into from
Jun 30, 2022

Conversation

neolivz
Copy link
Contributor

@neolivz neolivz commented May 25, 2022

…t and null support
Bug #1016

.prettierrc.json Outdated Show resolved Hide resolved
@@ -19,7 +19,10 @@ function setRef(ref: AnyRef, value: HTMLElementOrNull) {
* @param refA
* @param refB
*/
function useForkRef(refA: AnyRef, refB: AnyRef): CallbackRef | null {
function useForkRef<T extends HTMLElement | null = HTMLElementOrNull>(
Copy link
Owner

Choose a reason for hiding this comment

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

Amazing!

@codecov
Copy link

codecov bot commented Jun 30, 2022

Codecov Report

Merging #1017 (a7fa118) into main (2becfbe) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1017      +/-   ##
==========================================
- Coverage   91.13%   91.11%   -0.02%     
==========================================
  Files          67       67              
  Lines        4028     4019       -9     
  Branches      665      664       -1     
==========================================
- Hits         3671     3662       -9     
  Misses        356      356              
  Partials        1        1              
Impacted Files Coverage Δ
src/hooks/useForkRef.ts 97.67% <100.00%> (+0.17%) ⬆️
src/hooks/useOnWindowResize.ts 100.00% <0.00%> (ø)
src/hooks/useOnWindowScroll.ts 100.00% <0.00%> (ø)

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 2becfbe...a7fa118. Read the comment docs.

.prettierrc.json Outdated Show resolved Hide resolved
@imbhargav5 imbhargav5 merged commit add2bd5 into imbhargav5:main Jun 30, 2022
@github-actions
Copy link
Contributor

🎉 This PR is included in version 5.11.4 🎉

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.

2 participants