es-toolkit
es-toolkit copied to clipboard
chore(debounce): fix types
Description
Before the changes, return type used a Template type F, but we don't return a func function.
Actually, we return a debounced function. So, I change return type.
And more accuracy, I change type of extends target and add a test case.
Before
Correct return type is
(a: number) => void) & { cancel: () => void; }, but before type inference is not.
After
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| es-toolkit | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Aug 31, 2024 2:01am |
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.77%. Comparing base (
367fc87) to head (094c8b3). Report is 699 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #406 +/- ##
=======================================
Coverage 99.77% 99.77%
=======================================
Files 165 165
Lines 1321 1321
Branches 357 357
=======================================
Hits 1318 1318
Misses 2 2
Partials 1 1
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.