René's URL Explorer Experiment


Title: undefined is narrowed away incorrectly · Issue #60106 · microsoft/TypeScript · GitHub

Open Graph Title: undefined is narrowed away incorrectly · Issue #60106 · microsoft/TypeScript

X Title: undefined is narrowed away incorrectly · Issue #60106 · microsoft/TypeScript

Description: 🔎 Search Terms narrowing undefined, incorrect type narrowing, incorrect if statement narrowing 🕗 Version & Regression Information This changed between versions 5.2 and 5.3 ⏯ Playground Link https://www.typescriptlang.org/play/?#code/CYUw...

Open Graph Description: 🔎 Search Terms narrowing undefined, incorrect type narrowing, incorrect if statement narrowing 🕗 Version & Regression Information This changed between versions 5.2 and 5.3 ⏯ Playground Link https:/...

X Description: 🔎 Search Terms narrowing undefined, incorrect type narrowing, incorrect if statement narrowing 🕗 Version & Regression Information This changed between versions 5.2 and 5.3 ⏯ Playground Link htt...

Opengraph URL: https://github.com/microsoft/TypeScript/issues/60106

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"undefined is narrowed away incorrectly","articleBody":"### 🔎 Search Terms\r\n\r\nnarrowing undefined, incorrect type narrowing, incorrect if statement narrowing\r\n\r\n### 🕗 Version & Regression Information\r\n\r\n- This changed between versions 5.2 and 5.3\r\n\r\n### ⏯ Playground Link\r\n\r\nhttps://www.typescriptlang.org/play/?#code/CYUwxgNghgTiAEkoGdnwILwN4CgCQAksugBQCUAXPAC4AWAlmoxgNw4C+OOoSciA9gDtk1eAAco1aiBiCqmAD7wAroNAAzeoJDA261WGr0h8KGLEQAngAVJ02eWz566+CQlSZggPwA6IqRk8AC8ofDqUBDIIEG4eHge9oJs8QD0qfAAet74eHDUyrIpnAl2XinpWTnsQA\r\n\r\n### 💻 Code\r\n\r\n```ts\r\ndeclare class A {\r\n\tIsA(): this is A;\r\n}\r\n\r\ndeclare const pattern: A | undefined;\r\nfunction applyPattern() {\r\n\tif (pattern?.IsA() === false) {\r\n\t\tpattern;\r\n\t\t// ^?\r\n\t\treturn;\r\n\t}\r\n\tpattern;\r\n\t// ^?\r\n}\r\n```\r\n\r\n\r\n### 🙁 Actual behavior\r\n\r\n`pattern` is narrowed down to `A`, removing the undefined\r\n\r\n### 🙂 Expected behavior\r\n\r\n`pattern` should only be narrowed to `A | undefined`\r\n\r\n### Additional information about the issue\r\n\r\n_No response_","author":{"url":"https://github.com/TrippTrapp84","@type":"Person","name":"TrippTrapp84"},"datePublished":"2024-09-30T15:20:49Z","url":"https://github.com/microsoft/TypeScript/issues/60106"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c65c824a-ee06-e0af-d45c-f33da791a95e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCC20:27D3AD:21930BC:2A91198:6B0173DE
html-safe-nonceb0437be99d89d9c79b030574eee97dc3b51e5bd23b4acf9b64a08b1521631409
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzIwOjI3RDNBRDoyMTkzMEJDOjJBOTExOTg6NkIwMTczREUiLCJ2aXNpdG9yX2lkIjoiNTE2NTA1NzgwNTczMTg1MzI3OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac5434bd227a9d56ffe187344e40ecbd0aa1c2d084ebb31c5156ea265318306b9e
hovercard-subject-tagissue:2556992186
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/60106/issue_layout
twitter:imagehttps://opengraph.githubassets.com/1f874bd84447e733dcdb1ecba5d9bd99871e26d970e03e6ee63ae31c7c045495/microsoft/TypeScript/issues/60106
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1f874bd84447e733dcdb1ecba5d9bd99871e26d970e03e6ee63ae31c7c045495/microsoft/TypeScript/issues/60106
og:image:alt🔎 Search Terms narrowing undefined, incorrect type narrowing, incorrect if statement narrowing 🕗 Version & Regression Information This changed between versions 5.2 and 5.3 ⏯ Playground Link https:/...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameTrippTrapp84
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/60106#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F60106
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F60106
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/60106
Reloadhttps://github.com/microsoft/TypeScript/issues/60106
Reloadhttps://github.com/microsoft/TypeScript/issues/60106
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests312 (312)https://github.com/microsoft/TypeScript/pulls
Actionshttps://github.com/microsoft/TypeScript/actions
Projectshttps://github.com/microsoft/TypeScript/projects
Wikihttps://github.com/microsoft/TypeScript/wiki
Security and qualityhttps://github.com/microsoft/TypeScript/security
Insightshttps://github.com/microsoft/TypeScript/insights
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/60106
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/60106
undefined is narrowed away incorrectlyhttps://github.com/microsoft/TypeScript/issues/60106#top
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Domain: check: Control FlowThe issue relates to control flow analysishttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20check%3A%20Control%20Flow%22
Backloghttps://github.com/microsoft/TypeScript/milestone/29
https://github.com/TrippTrapp84
TrippTrapp84https://github.com/TrippTrapp84
on Sep 30, 2024https://github.com/microsoft/TypeScript/issues/60106#issue-2556992186
https://www.typescriptlang.org/play/?#code/CYUwxgNghgTiAEkoGdnwILwN4CgCQAksugBQCUAXPAC4AWAlmoxgNw4C+OOoSciA9gDtk1eAAco1aiBiCqmAD7wAroNAAzeoJDA261WGr0h8KGLEQAngAVJ02eWz566+CQlSZggPwA6IqRk8AC8ofDqUBDIIEG4eHge9oJs8QD0qfAAet74eHDUyrIpnAl2XinpWTnsQAhttps://www.typescriptlang.org/play/#code/CYUwxgNghgTiAEkoGdnwILwN4CgCQAksugBQCUAXPAC4AWAlmoxgNw4C+OOoSciA9gDtk1eAAco1aiBiCqmAD7wAroNAAzeoJDA261WGr0h8KGLEQAngAVJ02eWz566+CQlSZggPwA6IqRk8AC8ofDqUBDIIEG4eHge9oJs8QD0qfAAet74eHDUyrIpnAl2XinpWTnsQA
https://github.com/jcalz
Joe Calzaretta (jcalz)https://github.com/jcalz
on Sep 30, 2024https://github.com/microsoft/TypeScript/issues/60106#issuecomment-2384010730
#55613https://github.com/microsoft/TypeScript/pull/55613
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Help Wantedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Help%20Wanted%22
on Sep 30, 2024https://github.com/microsoft/TypeScript/issues/60106#event-14461493809
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Backloghttps://github.com/microsoft/TypeScript/milestone/29
on Sep 30, 2024https://github.com/microsoft/TypeScript/issues/60106#event-14461494076
https://github.com/Andarist
Mateusz Burzyński (Andarist)https://github.com/Andarist
on Sep 30, 2024https://github.com/microsoft/TypeScript/issues/60106#issuecomment-2384149114
#53714https://github.com/microsoft/TypeScript/pull/53714
https://github.com/Andarist
Mateusz Burzyński (Andarist)https://github.com/Andarist
on Oct 1, 2024https://github.com/microsoft/TypeScript/issues/60106#issuecomment-2385305483
TS playground 1https://www.typescriptlang.org/play/?target=1&ts=5.7.0-dev.20241001#code/CYUwxgNghgTiAEkoGdnwILwN4Ch7wEll0AKASgC54AXACwEs1GMBuHAXxx1CTkQHsAdsmrxBAVwjQARhBAAFKNWogYgqpgA+8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MPhtcip8oUVMVggBmQ5VGpkM5tUiUJ4TPo9eDvcaYr6zebwP4YrFA9a4TZg7aQ3a0AAscIIJ0REXOKK610udCMIDRmOJgLWnxA03xvy4xOxuDEQA
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Domain: check: Control FlowThe issue relates to control flow analysishttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20check%3A%20Control%20Flow%22
on Oct 16, 2025https://github.com/microsoft/TypeScript/issues/60106#event-20330973838
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Help Wantedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Help%20Wanted%22
on Nov 10, 2026https://github.com/microsoft/TypeScript/issues/60106#event-35721416737
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/60106
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/60106
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Domain: check: Control FlowThe issue relates to control flow analysishttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20check%3A%20Control%20Flow%22
BacklogNo due datehttps://github.com/microsoft/TypeScript/milestone/29
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.