Update underscore and weak-napi tests for TS 4.8#61419
Merged
Conversation
TS 4.8 improves narrowing of type predicates when a union is passed in. This changes the return type of a couple of underscore and weak-napi functions. For now I just updated the tests, since underscore's change is pretty minor. And weak-napi's types probably need to be rewritten substantially, which would probably result in fixing this change. See microsoft/TypeScript#49625 for the change.
Contributor
|
@sandersn Thank you for submitting this PR! This is a live comment which I will keep updated. 2 packages in this PRCode ReviewsBecause this PR edits multiple packages, it can be merged once it's reviewed by a DT maintainer. You can test the changes of this PR in the Playground. Status
Once every item on this list is checked, I'll ask you for permission to merge and publish the changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 61419,
"author": "sandersn",
"headCommitOid": "399faf690c0f6317050eac380ded07526179489a",
"mergeBaseOid": "6203b4a07c83db25b9b420a837d46284a4b565b7",
"lastPushDate": "2022-07-22T22:23:44.000Z",
"lastActivityDate": "2022-07-22T22:40:45.000Z",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Popular",
"pkgInfo": [
{
"name": "underscore",
"kind": "edit",
"files": [
{
"path": "types/underscore/underscore-tests.ts",
"kind": "test"
}
],
"owners": [
"borisyankov",
"jbaldwin",
"ccurrens",
"confususs",
"jgonggrijp",
"ffflorian",
"regevbr",
"peterblazejewicz",
"reubenrybnik"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Popular"
},
{
"name": "weak-napi",
"kind": "edit",
"files": [
{
"path": "types/weak-napi/weak-napi-tests.ts",
"kind": "test"
}
],
"owners": [
"DefinitelyTyped"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
}
],
"reviews": [],
"mainBotCommentID": 1192985208,
"ciResult": "pass"
} |
Contributor
|
🔔 @borisyankov @jbaldwin @ccurrens @confususs @jgonggrijp @ffflorian @regevbr @peterblazejewicz @reubenrybnik @DefinitelyTyped — please review this PR in the next few days. Be sure to explicitly select |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TS 4.8 improves narrowing of type predicates when a union is passed in. This changes the return type of a couple of underscore and weak-napi functions. For now I just updated the tests, since underscore's change is pretty minor. And weak-napi's types probably need to be rewritten substantially, which would probably result in fixing this change.
See microsoft/TypeScript#49625 for the change.