Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@alexander-akait
Copy link
Member

Summary

Added TypedHookMap with typed for/key

What kind of change does this PR introduce?

types

Did you add tests for your changes?

No need

Does this PR introduce a breaking change?

No, because it is a new type

If relevant, what needs to be documented once your changes are merged or what have you already documented?

Nothing

@codecov
Copy link

codecov bot commented Oct 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.95%. Comparing base (3fc6a06) to head (90afed2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #195   +/-   ##
=======================================
  Coverage   97.95%   97.95%           
=======================================
  Files          13       13           
  Lines         686      686           
  Branches      110      110           
=======================================
  Hits          672      672           
  Misses         13       13           
  Partials        1        1           
Flag Coverage Δ
integration 97.95% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alexander-akait alexander-akait merged commit c9181b0 into main Oct 2, 2025
34 checks passed
@alexander-akait alexander-akait deleted the fix-HookMap-type branch October 2, 2025 04:58
@jakebailey
Copy link

Not sure how much this matters, but this did break the test on DT: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/tapable/tapable-tests.ts

Error in tapable
Error: 
/home/runner/work/DefinitelyTyped/DefinitelyTyped/types/tapable/tapable-tests.ts
  2:7   error  [email protected], 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 5.9, 6.0 compile error: 
Type '(key: any, hook: any) => boolean' is not assignable to type 'HookFactory<boolean>'.
  Target signature provides too few arguments. Expected 2 or more, but got 1  @definitelytyped/expect
  2:35  error  [email protected], 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 5.9, 6.0 compile error: 
Parameter 'key' implicitly has an 'any' type                                                                                                                            @definitelytyped/expect
  2:40  error  [email protected], 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 5.9, 6.0 compile error: 
Parameter 'hook' implicitly has an 'any' type        

Since this is a breaking change, removing a parameter like this.

Was the change intended? (I am not super familiar with this package.)

@jakebailey
Copy link

I am not attached to this test, it seems pretty place-holder-y, so I'm going to change it, but I mention it just because someone else might break.

@alexander-akait
Copy link
Member Author

@jakebailey yeah, it was a bug fix, look at code and you will see that we have wrong types

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.

2 participants