-
Notifications
You must be signed in to change notification settings - Fork 502
fix: fix ts error in benchmark #1502
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes TypeScript errors in benchmark files by adding explicit type annotations to function parameters, correcting function calls, removing invalid test cases, and modernizing constructor functions to ES6 classes.
Key changes:
- Added type annotations to arrow function parameters throughout benchmark files
- Corrected API usage (e.g.,
pullfunction calls,spreadparameters) - Removed invalid test cases with non-existent types and string number arguments
Reviewed Changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| xorBy.bench.ts | Added type annotations to idMapper function parameters |
| wrap.bench.ts | Added any type annotation to function parameter |
| uniqWith.bench.ts | Added type annotations to comparator function parameters |
| unionWith.bench.ts | Added type annotations to equality comparator parameters |
| unionBy.bench.ts | Added type annotations to getId function parameter |
| truncate.bench.ts | Removed unused import and benchmarks for non-compat truncate function |
| transform.bench.ts | Added number type annotation to value parameter |
| toPlainObject.bench.ts | Modernized constructor function to ES6 class with typed prototype assignment |
| spread.bench.ts | Removed incorrect second argument from spreadToolkit call |
| round.bench.ts | Removed invalid string arguments from benchmark calls |
| pullAllWith.bench.ts | Added type annotations to comparator function parameters |
| pull.bench.ts | Fixed spread operator usage in function calls |
| overArgs.bench.ts | Added as any[] type assertion for property shorthand arrays |
| mergeWith.bench.ts | Changed parameter types from any to unknown |
| isMatchWith.bench.ts | Added unknown type annotations to customizer parameters |
| isEqualWith.bench.ts | Added unknown type annotations and null checks to customizers |
| invokeMap.bench.ts | Added type annotations including this context type |
| intersectionWith.bench.ts | Added type annotations to equality comparator parameters |
| includes.bench.ts | Removed invalid Symbol test cases |
| hasIn.bench.ts | Modernized constructor functions to ES6 classes |
| functionsIn.bench.ts | Modernized constructor function to ES6 class |
| flattenDeep.bench.ts | Added return type annotation to createNestedArray |
| flatten.bench.ts | Added return type annotation and ts-expect-error comment |
| curryRight.bench.ts | Fixed argument order in curried function calls |
| conformsTo.bench.ts | Fixed import/variable naming and added missing type annotation |
| cond.bench.ts | Added type annotations to predicate functions |
| cloneDeep.bench.ts | Fixed property initialization syntax in class instance |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1502 +/- ##
=======================================
Coverage 99.88% 99.88%
=======================================
Files 468 468
Lines 4453 4453
Branches 1311 1311
=======================================
Hits 4448 4448
Misses 5 5 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much!
No description provided.