René's URL Explorer Experiment


Title: Unwrap `NoInfer` types when narrowing by Andarist · Pull Request #58292 · microsoft/TypeScript · GitHub

Open Graph Title: Unwrap `NoInfer` types when narrowing by Andarist · Pull Request #58292 · microsoft/TypeScript

X Title: Unwrap `NoInfer` types when narrowing by Andarist · Pull Request #58292 · microsoft/TypeScript

Description: TypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Unwrap `NoInfer` types when narrowing by Andarist · Pull Request #58292 · microsoft/TypeScript

Open Graph Description: fixes #58266

X Description: fixes #58266

Opengraph URL: https://github.com/microsoft/TypeScript/pull/58292

X: @github

direct link

Domain: github.com

route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:195572fc-b03c-3f67-05c0-35060ba9b70a
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8050:195B6B:87A983:B37212:6A603DDE
html-safe-noncece4fd81615fd6c7ad62a3b333f6b15675c4ee358b467240a7c106239d92bffdc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDUwOjE5NUI2Qjo4N0E5ODM6QjM3MjEyOjZBNjAzRERFIiwidmlzaXRvcl9pZCI6Ijg4NDUzNTE5NzcwMjMwNzI5NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacbf1ad591d0bd7c6c8f18bdc007f483be32740739d305bfd96aa19744b717657c
hovercard-subject-tagpull_request:1836105852
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/microsoft/TypeScript/58292/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/7a67c6e1309b968de88c4876685cbefc372916129176db7f360f6acbd0fc82c5/microsoft/TypeScript/pull/58292
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7a67c6e1309b968de88c4876685cbefc372916129176db7f360f6acbd0fc82c5/microsoft/TypeScript/pull/58292
og:image:altfixes #58266
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameAndarist
hostnamegithub.com
expected-hostnamegithub.com
None60da8c2a42fa2bbf5f7567474990ec467836a84444262a58e200fa91b7f3d2d0
turbo-cache-controlno-cache
go-importgithub.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id20929025
octolytics-dimension-repository_nwomicrosoft/TypeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20929025
octolytics-dimension-repository_network_root_nwomicrosoft/TypeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9824515e740d83d5eb82168a089b806ab0fe04a1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/pull/58292#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fpull%2F58292
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fpull%2F58292
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/pull/58292
Reloadhttps://github.com/microsoft/TypeScript/pull/58292
Reloadhttps://github.com/microsoft/TypeScript/pull/58292
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/58292
microsoft https://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Notifications https://github.com/login?return_to=%2Fmicrosoft%2FTypeScript
Fork 13.6k https://github.com/login?return_to=%2Fmicrosoft%2FTypeScript
Star 110k https://github.com/login?return_to=%2Fmicrosoft%2FTypeScript
Code https://github.com/microsoft/TypeScript
Issues 5k+ https://github.com/microsoft/TypeScript/issues
Pull requests 30 https://github.com/microsoft/TypeScript/pulls
Actions https://github.com/microsoft/TypeScript/actions
Projects https://github.com/microsoft/TypeScript/projects
Models https://github.com/microsoft/TypeScript/models
Wiki https://github.com/microsoft/TypeScript/wiki
Security and quality 0 https://github.com/microsoft/TypeScript/security
Insights https://github.com/microsoft/TypeScript/pulse
Code https://github.com/microsoft/TypeScript
Issues https://github.com/microsoft/TypeScript/issues
Pull requests https://github.com/microsoft/TypeScript/pulls
Actions https://github.com/microsoft/TypeScript/actions
Projects https://github.com/microsoft/TypeScript/projects
Models https://github.com/microsoft/TypeScript/models
Wiki https://github.com/microsoft/TypeScript/wiki
Security and quality https://github.com/microsoft/TypeScript/security
Insights https://github.com/microsoft/TypeScript/pulse
sandersnhttps://github.com/sandersn
microsoft:mainhttps://github.com/microsoft/TypeScript/tree/main
Andarist:fix/noinfer-flow-typehttps://github.com/Andarist/TypeScript/tree/fix/noinfer-flow-type
Conversationhttps://github.com/microsoft/TypeScript/pull/58292
Commits8 (8)https://github.com/microsoft/TypeScript/pull/58292/commits
Checkshttps://github.com/microsoft/TypeScript/pull/58292/checks
Files changedhttps://github.com/microsoft/TypeScript/pull/58292/files
Unwrap NoInfer types when narrowinghttps://github.com/microsoft/TypeScript/pull/58292#top
sandersnhttps://github.com/sandersn
microsoft:mainhttps://github.com/microsoft/TypeScript/tree/main
Andarist:fix/noinfer-flow-typehttps://github.com/Andarist/TypeScript/tree/fix/noinfer-flow-type
https://github.com/Andarist
Andaristhttps://github.com/Andarist
Apr 23, 2024https://github.com/microsoft/TypeScript/pull/58292#issue-2258209212
#58266https://github.com/microsoft/TypeScript/issues/58266
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/58292
Andaristhttps://github.com/Andarist
April 21, 2024 23:14https://github.com/microsoft/TypeScript/pull/58292#commits-pushed-1f35684
https://github.com/Andarist
discriminate NoInfered union typeshttps://github.com/microsoft/TypeScript/pull/58292/commits/1f35684fa5dafef444c3c8514ab3058aa01026a3
1f35684https://github.com/microsoft/TypeScript/pull/58292/commits/1f35684fa5dafef444c3c8514ab3058aa01026a3
https://github.com/Andarist
unwrap NoInfer types earlyhttps://github.com/microsoft/TypeScript/pull/58292/commits/e4a3a4ce7486a287af09ce40a9b5bcd36ed833a6
e4a3a4chttps://github.com/microsoft/TypeScript/pull/58292/commits/e4a3a4ce7486a287af09ce40a9b5bcd36ed833a6
https://github.com/Andarist
add test casehttps://github.com/microsoft/TypeScript/pull/58292/commits/7b1ce0e82362c32b23982222890a93ec830b83b7
7b1ce0ehttps://github.com/microsoft/TypeScript/pull/58292/commits/7b1ce0e82362c32b23982222890a93ec830b83b7
https://github.com/typescript-bot
typescript-bothttps://github.com/typescript-bot
For Uncommitted Bug https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22For%20Uncommitted%20Bug%22
Apr 23, 2024https://github.com/microsoft/TypeScript/pull/58292#event-12571095164
https://github.com/Andarist
update baselinehttps://github.com/microsoft/TypeScript/pull/58292/commits/6bd13aa4baa5e899437e33d75aa02670e1df6790
6bd13aahttps://github.com/microsoft/TypeScript/pull/58292/commits/6bd13aa4baa5e899437e33d75aa02670e1df6790
https://github.com/Andarist
Andaristhttps://github.com/Andarist
Apr 23, 2024 https://github.com/microsoft/TypeScript/pull/58292#pullrequestreview-2016537660
View reviewed changes https://github.com/microsoft/TypeScript/pull/58292/files/7b1ce0e82362c32b23982222890a93ec830b83b7
src/compiler/checker.tshttps://github.com/microsoft/TypeScript/pull/58292/files/7b1ce0e82362c32b23982222890a93ec830b83b7#diff-d9ab6589e714c71e657f601cf30ff51dfc607fc98419bf72e04f6b0fa92cc4b8
Andaristhttps://github.com/Andarist
Apr 23, 2024https://github.com/microsoft/TypeScript/pull/58292#discussion_r1575822950
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
the original NoInfer PRhttps://github.com/microsoft/TypeScript/pull/56794
TS playgroundhttps://www.typescriptlang.org/play?ts=5.5.0-dev.20240422&ssl=9&ssc=4&pln=1&pc=1#code/CYUwxgNghgTiAEAzArgOzAFwJYHtXy1VRBgB4AVAPgApYBzALnnIEonyBuAKFElgRTpseeDmQYSFGlHYAaeGABGTWjEbwAcjgCSqRJKot4AXkrwAbjizA2Fq8G5cxEmNQDeSHDiYAiRbB94AF95VTojU3g3Lnh4ehj4AHpE+AA9AH4EsDwAZwx4OBzkCHzjAiISMJZuWOTY2IyuIOquIA
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/58292
ahejlsberghttps://github.com/ahejlsberg
May 1, 2024https://github.com/microsoft/TypeScript/pull/58292#discussion_r1586365637
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/58292
Andaristhttps://github.com/Andarist
May 1, 2024https://github.com/microsoft/TypeScript/pull/58292#discussion_r1586860414
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/58292
https://github.com/RyanCavanaugh
RyanCavanaughhttps://github.com/RyanCavanaugh
ahejlsberghttps://github.com/ahejlsberg
April 23, 2024 15:06https://github.com/microsoft/TypeScript/pull/58292#event-12577306781
https://github.com/ahejlsberg
ahejlsberghttps://github.com/ahejlsberg
May 1, 2024 https://github.com/microsoft/TypeScript/pull/58292#pullrequestreview-2033742134
View reviewed changes https://github.com/microsoft/TypeScript/pull/58292/files/6bd13aa4baa5e899437e33d75aa02670e1df6790
ahejlsberghttps://github.com/ahejlsberg
https://github.com/microsoft/TypeScript/pull/58292#pullrequestreview-2033742134
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/58292
Andaristhttps://github.com/Andarist
May 1, 2024 23:21https://github.com/microsoft/TypeScript/pull/58292#commits-pushed-5017184
https://github.com/Andarist
Merge remote-tracking branch 'origin/main' into fix/noinfer-flow-typehttps://github.com/microsoft/TypeScript/pull/58292/commits/501718433a50d6739b3a6d077fd7fb3e9f834278
5017184https://github.com/microsoft/TypeScript/pull/58292/commits/501718433a50d6739b3a6d077fd7fb3e9f834278
https://github.com/Andarist
Move NoInfer unwrapping to getNarrowableTypeForReferencehttps://github.com/microsoft/TypeScript/pull/58292/commits/d1e40791e14a3c601a0cef0018d76c034a3ff90e
d1e4079https://github.com/microsoft/TypeScript/pull/58292/commits/d1e40791e14a3c601a0cef0018d76c034a3ff90e
https://github.com/typescript-bot
typescript-bothttps://github.com/typescript-bot
For Backlog Bug https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22For%20Backlog%20Bug%22
For Uncommitted Bug https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22For%20Uncommitted%20Bug%22
May 1, 2024https://github.com/microsoft/TypeScript/pull/58292#event-12675189918
https://github.com/Andarist
Andaristhttps://github.com/Andarist
ahejlsberghttps://github.com/ahejlsberg
May 1, 2024 21:37https://github.com/microsoft/TypeScript/pull/58292#event-12675243927
https://github.com/Andarist
add an extra test casehttps://github.com/microsoft/TypeScript/pull/58292/commits/a3c58219da928c2eaa41d5e6b1b0a38d7e68f47a
a3c5821https://github.com/microsoft/TypeScript/pull/58292/commits/a3c58219da928c2eaa41d5e6b1b0a38d7e68f47a
https://github.com/ahejlsberg
ahejlsberghttps://github.com/ahejlsberg
May 28, 2024 https://github.com/microsoft/TypeScript/pull/58292#pullrequestreview-2083791277
View reviewed changes https://github.com/microsoft/TypeScript/pull/58292/files
https://github.com/Andarist
Andaristhttps://github.com/Andarist
May 30, 2024https://github.com/microsoft/TypeScript/pull/58292#issuecomment-2139648299
@sandersnhttps://github.com/sandersn
@RyanCavanaughhttps://github.com/RyanCavanaugh
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/58292
https://github.com/Andarist
Merge remote-tracking branch 'origin/main' into fix/noinfer-flow-typehttps://github.com/microsoft/TypeScript/pull/58292/commits/34a6d3dc7cb73de3ae58dd6d599553c18dcc08ec
34a6d3dhttps://github.com/microsoft/TypeScript/pull/58292/commits/34a6d3dc7cb73de3ae58dd6d599553c18dcc08ec
https://github.com/Andarist
Andaristhttps://github.com/Andarist
force-pushedhttps://github.com/microsoft/TypeScript/compare/8e672ba2c3fa31d25d9194285cfb94f146dc1eb5..34a6d3dc7cb73de3ae58dd6d599553c18dcc08ec
8e672bahttps://github.com/microsoft/TypeScript/commit/8e672ba2c3fa31d25d9194285cfb94f146dc1eb5
34a6d3dhttps://github.com/microsoft/TypeScript/commit/34a6d3dc7cb73de3ae58dd6d599553c18dcc08ec
Compare https://github.com/microsoft/TypeScript/compare/8e672ba2c3fa31d25d9194285cfb94f146dc1eb5..34a6d3dc7cb73de3ae58dd6d599553c18dcc08ec
May 31, 2024 08:13https://github.com/microsoft/TypeScript/pull/58292#event-12996517120
https://github.com/sandersn
sandersnhttps://github.com/sandersn
f5b2d9bhttps://github.com/microsoft/TypeScript/commit/f5b2d9b10ecaa358d9407972524457d6ad30cdc6
May 31, 2024https://github.com/microsoft/TypeScript/pull/58292#event-13002472717
skeatehttps://github.com/skeate
Jun 1, 2024 https://github.com/microsoft/TypeScript/pull/58292#ref-commit-9fc6c04
https://github.com/skeate
Merge remote-tracking branch 'upstream/main'https://github.com/skeate/TypeScript/commit/9fc6c04b0f4316d58ff7d373114755290bdad384
9fc6c04https://github.com/skeate/TypeScript/commit/9fc6c04b0f4316d58ff7d373114755290bdad384
microsoft#58719https://github.com/microsoft/TypeScript/pull/58719
microsoft#58706https://github.com/microsoft/TypeScript/pull/58706
microsoft#58677https://github.com/microsoft/TypeScript/pull/58677
microsoft#58615https://github.com/microsoft/TypeScript/pull/58615
microsoft#58727https://github.com/microsoft/TypeScript/pull/58727
microsoft#58061https://github.com/microsoft/TypeScript/pull/58061
microsoft#58593https://github.com/microsoft/TypeScript/pull/58593
microsoft#56466https://github.com/microsoft/TypeScript/pull/56466
microsoft#58715https://github.com/microsoft/TypeScript/pull/58715
microsoft#58722https://github.com/microsoft/TypeScript/pull/58722
microsoft#58292https://github.com/microsoft/TypeScript/pull/58292
microsoft#58720https://github.com/microsoft/TypeScript/pull/58720
microsoft#58718https://github.com/microsoft/TypeScript/pull/58718
microsoft#58364https://github.com/microsoft/TypeScript/pull/58364
microsoft#58702https://github.com/microsoft/TypeScript/pull/58702
microsoft#58639https://github.com/microsoft/TypeScript/pull/58639
microsoft#58705https://github.com/microsoft/TypeScript/pull/58705
microsoft#58621https://github.com/microsoft/TypeScript/pull/58621
microsoft#58624https://github.com/microsoft/TypeScript/pull/58624
microsoft#58679https://github.com/microsoft/TypeScript/pull/58679
https://github.com/Andarist
Andaristhttps://github.com/Andarist
Jun 27, 2024 https://github.com/microsoft/TypeScript/pull/58292#ref-pullrequest-2092523627
Unwrap substitution types early in getPropertyTypeForIndexType #57113 https://github.com/microsoft/TypeScript/pull/57113
https://github.com/Andarist
Andaristhttps://github.com/Andarist
September 19, 2024 16:02https://github.com/microsoft/TypeScript/pull/58292#event-14326790701
https://github.com/microsoft
microsofthttps://github.com/microsoft
Oct 16, 2025https://github.com/microsoft/TypeScript/pull/58292#event-20323076987
https://github.co/hiddenchars
https://github.com/microsoft/TypeScript/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fpull%2F58292
https://github.com/ahejlsberg
ahejlsberg https://github.com/ahejlsberg
https://github.com/microsoft/TypeScript/pull/58292/files/8e672ba2c3fa31d25d9194285cfb94f146dc1eb5
For Backlog Bug https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22For%20Backlog%20Bug%22
NoInfer isn't erased and breaks type narrowing https://github.com/microsoft/TypeScript/issues/58266
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/58292
https://github.com/Andarist
https://github.com/ahejlsberg
https://github.com/sandersn
https://github.com/typescript-bot
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.