[@types/underscore] Collection and Array Tests - Zip, Unzip, and Object#46306
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": 46306,
"author": "reubenrybnik",
"owners": [
"borisyankov",
"jbaldwin",
"ccurrens",
"confususs",
"jgonggrijp",
"ffflorian",
"regevbr",
"peterblazejewicz",
"reubenrybnik"
],
"dangerLevel": "ScopedAndTested",
"headCommitAbbrOid": "db3c2d5",
"headCommitOid": "db3c2d5aebf4f55de033a060b7f1b1cdec9ad1f1",
"mergeIsRequested": true,
"stalenessInDays": 0,
"lastPushDate": "2020-07-27T23:22:51.000Z",
"lastCommentDate": "2020-07-28T13:10:18.000Z",
"maintainerBlessed": false,
"reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46306/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-28T07:23:29.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. |
jgonggrijp
left a comment
There was a problem hiding this comment.
Great job again. I would prefer separate overloads for the one- and two-argument signatures of object, but otherwise I'm very happy with these changes.
|
@reubenrybnik One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits or comments. If you disagree with the reviewer's comments, you can "dismiss" the review using GitHub's review UI. Thank you! |
…y/value lists and making the result Dictionary<never> when a list of incorrect depth is supplied.
|
@jgonggrijp Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review? |
…y that it's private since unlike most of the types in this file this is really a type that's specifically a helper for the object function which typically shouldn't be used anywhere else.
Co-authored-by: Julian Gonggrijp <dev@juliangonggrijp.com>
|
@reubenrybnik The CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
|
@jgonggrijp I've made all the revisions I plan to for now here if you wouldn't mind taking another look whenever you have a moment. As usual, thanks for all the valuable feedback! |
jgonggrijp
left a comment
There was a problem hiding this comment.
This is better again, but I have one concern. See below.
If you disagree and you manage to convince me, I'll change the verdict to "approve".
|
@reubenrybnik One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits or comments. If you disagree with the reviewer's comments, you can "dismiss" the review using GitHub's review UI. Thank you! |
|
Ignore this, I'm just trying out adding a comment after marking all items resolved to see if anything happens. |
|
Nope. |
Co-authored-by: Julian Gonggrijp <dev@juliangonggrijp.com>
jgonggrijp
left a comment
There was a problem hiding this comment.
You convinced me about the constraint, but given that TS is not having it anyway, I also agree that it is still better to have it in place.
Again, good job!
|
@reubenrybnik Everything looks good here. Great job! I am ready to merge this PR on your behalf. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@borisyankov, @jbaldwin, @ccurrens, @confususs, @jgonggrijp, @ffflorian, @regevbr, @peterblazejewicz: you can do this too.) |
|
No new errors occur in my company's solution with this final set of changes. |
|
Ready to merge |
|
I just published |
…rray Tests - Zip, Unzip, and Object by @reubenrybnik * Updating type definitions for zip, unzip, and object and adding tests. * Adding undefined to possible results of object when given separate key/value lists and making the result Dictionary<never> when a list of incorrect depth is supplied. * Adding tests for single arguments for zip. * Adding comments that help to explain the logic of PairValue. * Splitting PairValue into two separate types instead of nesting logic. * Putting an underscore in front of the ObjectValue type to help signify that it's private since unlike most of the types in this file this is really a type that's specifically a helper for the object function which typically shouldn't be used anywhere else. * Removing a portion of the summary comments for zip since they aren't needed anymore. * Infer the pair list type when possible instead of using `any` Co-authored-by: Julian Gonggrijp <dev@juliangonggrijp.com> * Making object into separate overloads. * Constraining the list of keys to be members of EnumerableKey. Co-authored-by: Julian Gonggrijp <dev@juliangonggrijp.com> Co-authored-by: Julian Gonggrijp <dev@juliangonggrijp.com>
…rray Tests - Zip, Unzip, and Object by @reubenrybnik * Updating type definitions for zip, unzip, and object and adding tests. * Adding undefined to possible results of object when given separate key/value lists and making the result Dictionary<never> when a list of incorrect depth is supplied. * Adding tests for single arguments for zip. * Adding comments that help to explain the logic of PairValue. * Splitting PairValue into two separate types instead of nesting logic. * Putting an underscore in front of the ObjectValue type to help signify that it's private since unlike most of the types in this file this is really a type that's specifically a helper for the object function which typically shouldn't be used anywhere else. * Removing a portion of the summary comments for zip since they aren't needed anymore. * Infer the pair list type when possible instead of using `any` Co-authored-by: Julian Gonggrijp <dev@juliangonggrijp.com> * Making object into separate overloads. * Constraining the list of keys to be members of EnumerableKey. Co-authored-by: Julian Gonggrijp <dev@juliangonggrijp.com> Co-authored-by: Julian Gonggrijp <dev@juliangonggrijp.com>
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:
zip,unzip, andobject.UnderscoreStatic.zipthat doesn't seem like it's correct.unzipfunctions to not take more than a single input (either a single parameter or the wrapped value).objectto a single overload that always results in aDictionaryof some sort rather than allowing the caller to specify a more exact result through generics and infers its resulting value type when it can, falling back toanywhen it can't._Chainfunctions to use the correct wrapped value typeV(these are more drastic changes than those that partially fix @types/underscore error TS2322 for_.chainafter upgrade to v1.9 #36308 though).