[@types/underscore] Collection and Array Tests - SortBy, IndexBy, CountBy, and Invoke#46352
Conversation
|
@reubenrybnik Thank you for submitting this PR! This is a live comment which I will keep updated. Code ReviewsBecause you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it. Status
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 46352,
"author": "reubenrybnik",
"owners": [
"borisyankov",
"jbaldwin",
"ccurrens",
"confususs",
"jgonggrijp",
"ffflorian",
"regevbr",
"peterblazejewicz",
"reubenrybnik"
],
"dangerLevel": "ScopedAndTested",
"headCommitAbbrOid": "50f6f6c",
"headCommitOid": "50f6f6c58c7c80ed2ddc274da254143e774b1077",
"mergeIsRequested": true,
"stalenessInDays": 0,
"lastPushDate": "2020-07-27T23:28:05.000Z",
"lastCommentDate": "2020-07-28T21:14:14.000Z",
"maintainerBlessed": false,
"reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46352/files",
"hasMergeConflict": false,
"authorIsOwner": true,
"isFirstContribution": false,
"popularityLevel": "Popular",
"anyPackageIsNew": false,
"packages": [
"underscore"
],
"files": [
{
"path": "types/underscore/index.d.ts",
"kind": "definition",
"package": "underscore"
},
{
"path": "types/underscore/underscore-tests.ts",
"kind": "test",
"package": "underscore"
}
],
"hasDismissedReview": false,
"ciResult": "pass",
"lastReviewDate": "2020-07-28T19:31:15.000Z",
"reviewersWithStaleReviews": [],
"approvalFlags": 2,
"isChangesRequested": false
} |
|
🔔 @borisyankov @jbaldwin @ccurrens @confususs @jgonggrijp @ffflorian @regevbr @peterblazejewicz — please review this PR in the next few days. Be sure to explicitly select |
|
👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings. Let’s review the numbers, shall we? Comparison details 📊
It looks like nothing changed too much. I won’t post performance data again unless it gets worse. |
…By to EnumerableKey.
|
Thanks @jgonggrijp, this is the last PR for Collections! Just two more PRs for Arrays, one for your requested changes to Objects, and some cleanup 😁 |
|
Ready to merge |
|
I just published |
|
Darn, forgot to re-run the latest set of changes against my company's solution, with the switch to requiring a result of |
…rray Tests - SortBy, IndexBy, CountBy, and Invoke by @reubenrybnik * Updating type definitions for sortBy, indexBy, and countBy and adding tests. * Switching "iterator" to "iteratee" for a few test groups. * Making a few adjustments to groupBy to better match similar functions. * Updating type definitions for invoke and adding tests. * Constraining allowed iteratee results for groupBy, indexBy, and countBy to EnumerableKey.
…rray Tests - SortBy, IndexBy, CountBy, and Invoke by @reubenrybnik * Updating type definitions for sortBy, indexBy, and countBy and adding tests. * Switching "iterator" to "iteratee" for a few test groups. * Making a few adjustments to groupBy to better match similar functions. * Updating type definitions for invoke and adding tests. * Constraining allowed iteratee results for groupBy, indexBy, and countBy to EnumerableKey.
npm test.)npm run lint package-name(ortscif notslint.jsonis present).This PR continues the planned set that will together add up to #45201 and includes the following changes:
sortBy,indexBy,countBy, andinvoke.sortBy,indexBy,countBy, andinvoketo useCollectionandIterateeto partially fix Underscore collections functions should take objects #20623.invokereturn types fromanyandTtoany[]._Chain.sortBy,_Chain.indexBy,_Chain.countBy, and_Chain.invoketo use the correct wrapped value typeVto partially fix @types/underscore error TS2322 for_.chainafter upgrade to v1.9 #36308._Chain.countByto benumberinstead ofT.groupByto be more consistent with these overloads by making tweaks to summary comments, makingiterateeoptional, and adding tests for alliterateetypes.maxandminto say "iteratee" instead of "iterator" because I messed that up in my last PR.This is the last PR in the Collections family.