René's URL Explorer Experiment


Title: Improve `unknown` narrowing by negated type predicates by Andarist · Pull Request #60795 · microsoft/TypeScript · GitHub

Open Graph Title: Improve `unknown` narrowing by negated type predicates by Andarist · Pull Request #60795 · microsoft/TypeScript

X Title: Improve `unknown` narrowing by negated type predicates by Andarist · Pull Request #60795 · microsoft/TypeScript

Description: TypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Improve `unknown` narrowing by negated type predicates by Andarist · Pull Request #60795 · microsoft/TypeScript

Open Graph Description: fixes #60789

X Description: fixes #60789

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

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:bd241077-1e7c-06d5-75c4-2326e5db39d7
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB722:26D6B:E6FC81:152D75A:6A6093E1
html-safe-noncef4927101fce760b3fde14970533292983e5d4d38b1121deb735aac3c27d7ec8b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNzIyOjI2RDZCOkU2RkM4MToxNTJENzVBOjZBNjA5M0UxIiwidmlzaXRvcl9pZCI6IjI4NTUyMjkxODI4MjEwNDUyMTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacd583779e69da25f9ca8019445cf4be1d4d4a8f5d62cfbdfaaf4244724854ac40
hovercard-subject-tagpull_request:2240461684
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/60795/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/f72e69325bb22ec795b8f6e3c63ef2a6cd4784f6ee0dcd0dc4e81ae196ab602d/microsoft/TypeScript/pull/60795
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f72e69325bb22ec795b8f6e3c63ef2a6cd4784f6ee0dcd0dc4e81ae196ab602d/microsoft/TypeScript/pull/60795
og:image:altfixes #60789
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameAndarist
hostnamegithub.com
expected-hostnamegithub.com
None5142d23feb6a650085422edf60d68c93777dfa6c4b0c9151eb464d3e4969f618
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
release6211071718785f6af328d66ee8cf4a7ce606987e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/pull/60795#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fpull%2F60795
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%2F60795
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/60795
Reloadhttps://github.com/microsoft/TypeScript/pull/60795
Reloadhttps://github.com/microsoft/TypeScript/pull/60795
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/60795
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
gabrittohttps://github.com/gabritto
microsoft:mainhttps://github.com/microsoft/TypeScript/tree/main
Andarist:improve-negated-unknown-narrowing-by-type-predicatehttps://github.com/Andarist/TypeScript/tree/improve-negated-unknown-narrowing-by-type-predicate
Conversationhttps://github.com/microsoft/TypeScript/pull/60795
Commits2 (2)https://github.com/microsoft/TypeScript/pull/60795/commits
Checkshttps://github.com/microsoft/TypeScript/pull/60795/checks
Files changedhttps://github.com/microsoft/TypeScript/pull/60795/files
Improve unknown narrowing by negated type predicateshttps://github.com/microsoft/TypeScript/pull/60795#top
gabrittohttps://github.com/gabritto
microsoft:mainhttps://github.com/microsoft/TypeScript/tree/main
Andarist:improve-negated-unknown-narrowing-by-type-predicatehttps://github.com/Andarist/TypeScript/tree/improve-negated-unknown-narrowing-by-type-predicate
https://github.com/Andarist
Andaristhttps://github.com/Andarist
Dec 17, 2024https://github.com/microsoft/TypeScript/pull/60795#issue-2745826469
#60789https://github.com/microsoft/TypeScript/issues/60789
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/60795
https://github.com/Andarist
Improve unknown narrowing by negated type predicateshttps://github.com/microsoft/TypeScript/pull/60795/commits/6fdf0965551274645e8177890821b73332633d1e
6fdf096https://github.com/microsoft/TypeScript/pull/60795/commits/6fdf0965551274645e8177890821b73332633d1e
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
Dec 17, 2024https://github.com/microsoft/TypeScript/pull/60795#event-15691649845
https://github.com/gabritto
gabrittohttps://github.com/gabritto
Dec 17, 2024https://github.com/microsoft/TypeScript/pull/60795#issuecomment-2549499725
@typescript-bothttps://github.com/typescript-bot
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/60795
https://github.com/typescript-bot
typescript-bothttps://github.com/typescript-bot
Dec 17, 2024https://github.com/microsoft/TypeScript/pull/60795#issuecomment-2549499860
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/60795
✅ Startedhttps://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_build/results?buildId=164405
✅ Resultshttps://github.com/microsoft/TypeScript/pull/60795#issuecomment-2549689831
✅ Startedhttps://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_build/results?buildId=164406
✅ Resultshttps://github.com/microsoft/TypeScript/pull/60795#issuecomment-2549548110
✅ Startedhttps://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_build/results?buildId=164404
✅ Resultshttps://github.com/microsoft/TypeScript/pull/60795#issuecomment-2549549446
✅ Startedhttps://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_build/results?buildId=164407
👀 Resultshttps://github.com/microsoft/TypeScript/pull/60795#issuecomment-2549595509
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/60795
https://github.com/gabritto
gabrittohttps://github.com/gabritto
Dec 17, 2024 https://github.com/microsoft/TypeScript/pull/60795#pullrequestreview-2510005429
View reviewed changes https://github.com/microsoft/TypeScript/pull/60795/files/6fdf0965551274645e8177890821b73332633d1e
src/compiler/checker.tshttps://github.com/microsoft/TypeScript/pull/60795/files/6fdf0965551274645e8177890821b73332633d1e#diff-d9ab6589e714c71e657f601cf30ff51dfc607fc98419bf72e04f6b0fa92cc4b8
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/60795
https://github.com/typescript-bot
typescript-bothttps://github.com/typescript-bot
Dec 17, 2024https://github.com/microsoft/TypeScript/pull/60795#issuecomment-2549548110
@gabrittohttps://github.com/gabritto
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/60795
https://github.com/typescript-bot
typescript-bothttps://github.com/typescript-bot
Dec 17, 2024https://github.com/microsoft/TypeScript/pull/60795#issuecomment-2549549446
@gabrittohttps://github.com/gabritto
You can check the log herehttps://typescript.visualstudio.com/TypeScript/_build/index?buildId=164404&_a=summary
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/60795
https://github.com/typescript-bot
typescript-bothttps://github.com/typescript-bot
Dec 17, 2024https://github.com/microsoft/TypeScript/pull/60795#issuecomment-2549595509
@gabrittohttps://github.com/gabritto
Download Benchmarkshttps://typescript.visualstudio.com/TypeScript/_build/results?buildId=164407&view=artifacts
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/60795
https://github.com/typescript-bot
typescript-bothttps://github.com/typescript-bot
Dec 17, 2024https://github.com/microsoft/TypeScript/pull/60795#issuecomment-2549689831
@gabrittohttps://github.com/gabritto
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/60795
https://github.com/Andarist
use recombineUnknownTypehttps://github.com/microsoft/TypeScript/pull/60795/commits/042aceda62ae273c63f9b5db9e2df442f54790e7
042acedhttps://github.com/microsoft/TypeScript/pull/60795/commits/042aceda62ae273c63f9b5db9e2df442f54790e7
https://github.com/Andarist
Andaristhttps://github.com/Andarist
gabrittohttps://github.com/gabritto
December 18, 2024 06:26https://github.com/microsoft/TypeScript/pull/60795#event-15698198000
https://github.com/gabritto
gabrittohttps://github.com/gabritto
Dec 18, 2024https://github.com/microsoft/TypeScript/pull/60795#issuecomment-2551985493
@typescript-bothttps://github.com/typescript-bot
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/60795
https://github.com/typescript-bot
typescript-bothttps://github.com/typescript-bot
Dec 18, 2024https://github.com/microsoft/TypeScript/pull/60795#issuecomment-2551985607
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/60795
✅ Startedhttps://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_build/results?buildId=164425
✅ Resultshttps://github.com/microsoft/TypeScript/pull/60795#issuecomment-2551988621
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/60795
https://github.com/typescript-bot
typescript-bothttps://github.com/typescript-bot
Dec 18, 2024https://github.com/microsoft/TypeScript/pull/60795#issuecomment-2551988621
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/60795
@gabrittohttps://github.com/gabritto
an installable tgzhttps://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/164425/artifacts?artifactName=tgz&fileId=854838C8C1BC0A3E52BA95C06664905DE93FF91DAF52B7D70630FEA7698FFC8002&fileName=/typescript-5.8.0-insiders.20241218.tgz
for this buildhttps://www.typescriptlang.org/play?ts=5.8.0-pr-60795-8
npmhttps://www.npmjs.com/package/@typescript-deploys/pr-build/v/5.8.0-pr-60795-8
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/60795
https://github.com/gabritto
gabrittohttps://github.com/gabritto
Dec 18, 2024 https://github.com/microsoft/TypeScript/pull/60795#pullrequestreview-2512591849
View reviewed changes https://github.com/microsoft/TypeScript/pull/60795/files/042aceda62ae273c63f9b5db9e2df442f54790e7
https://github.com/gabritto
gabrittohttps://github.com/gabritto
Dec 18, 2024https://github.com/microsoft/TypeScript/pull/60795#issuecomment-2552032233
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/60795
https://www.typescriptlang.org/play/?ts=5.8.0-dev.20241218#code/GYVwdgxgLglg9mABAIwIYBMA8AVRBTADyjzHQGdFwBrMOAdzAD4AKAgLkWwEoOA3OGOkQBvAFCJEMYIlaIAhAF5KpPMBhg86LiPETEEBGSiIAnh2EBfREoIBuXRd14ANmTw69+w8bOIwIZ2dEAB9ldFV1TWtEO0QAejjEAFEAJxS4FI4AAwIsyQpaYzBUNPoogAs8FLwHUUdRUEhYBEQAczg4LFxCYlIKSxC-AKDQ8HC1DXQWdk4eRH5BD0lpWUUwiMntMU8DMCNTcysbewlHCRc3JYld-d9-QMGxjajj+MSAdQyqMmzc-L8Suk6BUqjVTnUgAhttps://www.typescriptlang.org/play/?ts=5.8.0-dev.20241218#code/GYVwdgxgLglg9mABAIwIYBMA8AVRBTADyjzHQGdFwBrMOAdzAD4AKAgLkWwEoOA3OGOkQBvAFCJEMYIlaIAhAF5KpPMBhg86LiPETEEBGSiIAnh2EBfREoIBuXRd14ANmTw69+w8bOIwIZ2dEAB9ldFV1TWtEO0QAejjEAFEAJxS4FI4AAwIsyQpaYzBUNPoogAs8FLwHUUdRUEhYBEQAczg4LFxCYlIKSxC-AKDQ8HC1DXQWdk4eRH5BD0lpWUUwiMntMU8DMCNTcysbewlHCRc3JYld-d9-QMGxjajj+MSAdQyqMmzc-L8Suk6BUqjVTnUgA
#56941https://github.com/microsoft/TypeScript/pull/56941
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/60795
https://github.com/gabritto
gabrittohttps://github.com/gabritto
0dda037https://github.com/microsoft/TypeScript/commit/0dda037f9fc53af3623b9e7371a731947a572d40
Dec 18, 2024https://github.com/microsoft/TypeScript/pull/60795#event-15707545497
https://github.com/Andarist
Andaristhttps://github.com/Andarist
Dec 19, 2024 https://github.com/microsoft/TypeScript/pull/60795#ref-pullrequest-2749893954
Improve narrowing of generic types constrained to unknown #60816 https://github.com/microsoft/TypeScript/pull/60816
https://github.com/Andarist
Andaristhttps://github.com/Andarist
December 19, 2024 11:23https://github.com/microsoft/TypeScript/pull/60795#event-15716029120
https://github.com/sandersn
sandersnhttps://github.com/sandersn
PR Backloghttps://github.com/orgs/microsoft/projects/1252
Apr 22, 2025https://github.com/microsoft/TypeScript/pull/60795#event-17355498945
https://github.com/Andarist
Andaristhttps://github.com/Andarist
Jun 4, 2025 https://github.com/microsoft/TypeScript/pull/60795#ref-pullrequest-3118035171
Port "Improve unknown narrowing by negated type predicates" microsoft/typescript-go#1044 https://github.com/microsoft/typescript-go/pull/1044
https://github.com/microsoft
microsofthttps://github.com/microsoft
Oct 15, 2025https://github.com/microsoft/TypeScript/pull/60795#event-20306825026
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%2F60795
https://github.com/gabritto
gabritto https://github.com/gabritto
https://github.com/microsoft/TypeScript/pull/60795/files/042aceda62ae273c63f9b5db9e2df442f54790e7
For Uncommitted Bug https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22For%20Uncommitted%20Bug%22
Negated {} and null | undefined predicates on unknown should still narrow https://github.com/microsoft/TypeScript/issues/60789
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/60795
https://github.com/Andarist
https://github.com/gabritto
https://github.com/typescript-bot
https://github.com/sandersn
https://github.com/jakebailey
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.