deno_std
deno_std copied to clipboard
refactor(collections): improve implementation signatures
This PR simplifies the implementation signatures of some functions within std/collections.
Previously, selector parameters were written in a manner that was a little more complicated than needed, also resulting in having to rely on ReturnType<typeof selector> within function bodies. The return type of selector parameters are now defined within a second type argument, S.
This change is non-breaking as it adds a new type argument. The aim of this change is to make implementation signatures of these functions easier to understand, and hopefully avoid the need for overload signatures for these functions.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 91.36%. Comparing base (
1cfd39c) to head (5cfcb96).
Additional details and impacted files
@@ Coverage Diff @@
## main #4666 +/- ##
=======================================
Coverage 91.36% 91.36%
=======================================
Files 477 477
Lines 37334 37331 -3
Branches 5325 5325
=======================================
- Hits 34109 34107 -2
Misses 3164 3164
+ Partials 61 60 -1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.