René's URL Explorer Experiment


Title: fix(50340): typeof ... === "undefined" check on discriminated union of undefined and object type doesn't narrow correctly by a-tarasyuk · Pull Request #50344 · microsoft/TypeScript · GitHub

Open Graph Title: fix(50340): typeof ... === "undefined" check on discriminated union of undefined and object type doesn't narrow correctly by a-tarasyuk · Pull Request #50344 · microsoft/TypeScript

X Title: fix(50340): typeof ... === "undefined" check on discriminated union of undefined and object type doesn't narrow correctly by a-tarasyuk · Pull Request #50344 · microsoft/TypeScript

Description: TypeScript is a superset of JavaScript that compiles to clean JavaScript output. - fix(50340): typeof ... === "undefined" check on discriminated union of undefined and object type doesn't narrow correctly by a-tarasyuk · Pull Request #50344 · microsoft/TypeScript

Open Graph Description: Fixes #50340

X Description: Fixes #50340

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3

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/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:e1d26298-059c-9697-2693-aaf53161aeef
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA000:7607C:52E2E7:71B333:6B0471B3
html-safe-nonce72d2265e5e134221e099dd1a99f01df8131913527f37faf0bd4a2ac3523f4fa6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDAwOjc2MDdDOjUyRTJFNzo3MUIzMzM6NkIwNDcxQjMiLCJ2aXNpdG9yX2lkIjoiNzA2MjQ4MDA2MTA5Nzg2NTY1MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac26e320de7df5d381b5248f97d42e6f457b4e0d58d7ef910ea9ef41a0962c5e89
hovercard-subject-tagpull_request:1029322721
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/50344/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/38d81fc2b735c908861dcdd45cdab8274cdb8c057e9bd370ce48f2b946400b47/microsoft/TypeScript/pull/50344
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/38d81fc2b735c908861dcdd45cdab8274cdb8c057e9bd370ce48f2b946400b47/microsoft/TypeScript/pull/50344
og:image:altFixes #50340
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamea-tarasyuk
hostnamegithub.com
expected-hostnamegithub.com
Noneae8802492f12d3ba4f6b0d814054e617a2a5616b6327bf8555c10cd5b0dc2a6f
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
releasecfb5f24c6e01d85f70804652a5107e5cac03a161
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/pull/50344#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fpull%2F50344
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%2Fpull%2F50344
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%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/pull/50344
Reloadhttps://github.com/microsoft/TypeScript/pull/50344
Reloadhttps://github.com/microsoft/TypeScript/pull/50344
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests319 (319)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
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
microsoft:mainhttps://github.com/microsoft/TypeScript/tree/main
a-tarasyuk:fix/50340https://github.com/a-tarasyuk/TypeScript/tree/fix/50340
Conversationhttps://github.com/microsoft/TypeScript/pull/50344
Commits3 (3)https://github.com/microsoft/TypeScript/pull/50344/commits
Checkshttps://github.com/microsoft/TypeScript/pull/50344/checks
Files changedhttps://github.com/microsoft/TypeScript/pull/50344/files
fix(50340): typeof ... === "undefined" check on discriminated union of undefined and object type doesn't narrow correctlyhttps://github.com/microsoft/TypeScript/pull/50344#top
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
microsoft:mainhttps://github.com/microsoft/TypeScript/tree/main
a-tarasyuk:fix/50340https://github.com/a-tarasyuk/TypeScript/tree/fix/50340
https://github.com/a-tarasyuk
Oleksandr Tarasiuk (a-tarasyuk)https://github.com/a-tarasyuk
Aug 17, 2022https://github.com/microsoft/TypeScript/pull/50344#issue-1342313589
#50340https://github.com/microsoft/TypeScript/issues/50340
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/50344
fix(50340): narrow type by discriminant in typeofhttps://github.com/microsoft/TypeScript/pull/50344/commits/b4e02abf06b7f014855d5914aa1f6dd501a45a9d
b4e02abhttps://github.com/microsoft/TypeScript/pull/50344/commits/b4e02abf06b7f014855d5914aa1f6dd501a45a9d
https://github.com/typescript-bot
TypeScript Bot (typescript-bot)https://github.com/typescript-bot
For Backlog Bug https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22For%20Backlog%20Bug%22
Aug 17, 2022https://github.com/microsoft/TypeScript/pull/50344#event-7209375117
https://github.com/a-tarasyuk
Oleksandr Tarasiuk (a-tarasyuk)https://github.com/a-tarasyuk
August 17, 2022 21:59https://github.com/microsoft/TypeScript/pull/50344#event-7209475439
https://github.com/DanielRosenwasser
Aug 18, 2022https://github.com/microsoft/TypeScript/pull/50344#issuecomment-1219804180
TypeScript Bot (@typescript-bot)https://github.com/typescript-bot
TypeScript Bot (@typescript-bot)https://github.com/typescript-bot
TypeScript Bot (@typescript-bot)https://github.com/typescript-bot
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/50344
https://github.com/typescript-bot
Aug 18, 2022https://github.com/microsoft/TypeScript/pull/50344#issuecomment-1219804217
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/50344
Daniel Rosenwasser (@DanielRosenwasser)https://github.com/DanielRosenwasser
b4e02abhttps://github.com/microsoft/TypeScript/commit/b4e02abf06b7f014855d5914aa1f6dd501a45a9d
herehttps://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_build/results?buildId=132146
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/50344
https://github.com/typescript-bot
Aug 18, 2022https://github.com/microsoft/TypeScript/pull/50344#issuecomment-1219804221
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/50344
Daniel Rosenwasser (@DanielRosenwasser)https://github.com/DanielRosenwasser
b4e02abhttps://github.com/microsoft/TypeScript/commit/b4e02abf06b7f014855d5914aa1f6dd501a45a9d
herehttps://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_build/results?buildId=132148
The results are in!https://github.com/microsoft/TypeScript/pull/50344#issuecomment-1219814421
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/50344
https://github.com/typescript-bot
Aug 18, 2022https://github.com/microsoft/TypeScript/pull/50344#issuecomment-1219804222
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/50344
Daniel Rosenwasser (@DanielRosenwasser)https://github.com/DanielRosenwasser
b4e02abhttps://github.com/microsoft/TypeScript/commit/b4e02abf06b7f014855d5914aa1f6dd501a45a9d
herehttps://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_build/results?buildId=132147
The results are in!https://github.com/microsoft/TypeScript/pull/50344#issuecomment-1219896548
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/50344
https://github.com/typescript-bot
Aug 18, 2022https://github.com/microsoft/TypeScript/pull/50344#issuecomment-1219814421
Daniel Rosenwasser (@DanielRosenwasser)https://github.com/DanielRosenwasser
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/50344
https://github.com/typescript-bot
Aug 18, 2022https://github.com/microsoft/TypeScript/pull/50344#issuecomment-1219828209
Daniel Rosenwasser (@DanielRosenwasser)https://github.com/DanielRosenwasser
here.https://mseng.visualstudio.com/DefaultCollection/Typescript/_git/Typescript/pullrequest/675509
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/50344
https://github.com/typescript-bot
Aug 18, 2022https://github.com/microsoft/TypeScript/pull/50344#issuecomment-1219896548
Daniel Rosenwasser (@DanielRosenwasser)https://github.com/DanielRosenwasser
Download Benchmarkhttps://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/132147/artifacts?artifactName=benchmark&fileId=8DECDDB047CC6D878BB9902375C2A481E3A23B6A30D782485D1F8C4BB1A705BF01&fileName=linux.benchmark
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/50344
https://github.com/DanielRosenwasser
Aug 18, 2022https://github.com/microsoft/TypeScript/pull/50344#issuecomment-1219922679
TypeScript Bot (@typescript-bot)https://github.com/typescript-bot
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/50344
https://github.com/typescript-bot
Aug 18, 2022https://github.com/microsoft/TypeScript/pull/50344#issuecomment-1219922727
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/50344
Daniel Rosenwasser (@DanielRosenwasser)https://github.com/DanielRosenwasser
b4e02abhttps://github.com/microsoft/TypeScript/commit/b4e02abf06b7f014855d5914aa1f6dd501a45a9d
herehttps://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_build/results?buildId=132159
The results are in!https://github.com/microsoft/TypeScript/pull/50344#issuecomment-1219954899
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/50344
https://github.com/typescript-bot
Aug 18, 2022https://github.com/microsoft/TypeScript/pull/50344#issuecomment-1219954899
Daniel Rosenwasser (@DanielRosenwasser)https://github.com/DanielRosenwasser
Download Benchmarkhttps://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/132159/artifacts?artifactName=benchmark&fileId=5EF8E4FDB6133AB16B27E1AD2E03E55A9A078BC5582DD836BEFCA7CC836C7F6701&fileName=linux.benchmark
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/50344
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
Wesley Wigham (weswigham)https://github.com/weswigham
August 26, 2022 22:44https://github.com/microsoft/TypeScript/pull/50344#event-7270925234
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
Aug 26, 2022 https://github.com/microsoft/TypeScript/pull/50344#pullrequestreview-1087574050
View reviewed changes https://github.com/microsoft/TypeScript/pull/50344/files/b4e02abf06b7f014855d5914aa1f6dd501a45a9d
tests/cases/compiler/narrowingTypeofUndefined.tshttps://github.com/microsoft/TypeScript/pull/50344/files/b4e02abf06b7f014855d5914aa1f6dd501a45a9d#diff-d99aadd91d190f907722df4a3bb2a2fe2a365c8d30e37c4f449ec15873e2688e
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/50344
August 27, 2022 09:56https://github.com/microsoft/TypeScript/pull/50344#commits-pushed-5ffac1f
add additional test caseshttps://github.com/microsoft/TypeScript/pull/50344/commits/5ffac1f3dc0e299449f3799bf08c279f3f048ad5
5ffac1fhttps://github.com/microsoft/TypeScript/pull/50344/commits/5ffac1f3dc0e299449f3799bf08c279f3f048ad5
Merge branch 'main' ofhttps://github.com/microsoft/TypeScript/pull/50344/commits/c75043eb12354d42dba4a4e17db9252645151fda
https://github.com/microsoft/TypeScripthttps://github.com/microsoft/TypeScript
into f…https://github.com/microsoft/TypeScript/pull/50344/commits/c75043eb12354d42dba4a4e17db9252645151fda
c75043ehttps://github.com/microsoft/TypeScript/pull/50344/commits/c75043eb12354d42dba4a4e17db9252645151fda
https://github.com/a-tarasyuk
Oleksandr Tarasiuk (a-tarasyuk)https://github.com/a-tarasyuk
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
Wesley Wigham (weswigham)https://github.com/weswigham
August 27, 2022 07:34https://github.com/microsoft/TypeScript/pull/50344#event-7271759785
https://github.com/a-tarasyuk
Aug 27, 2022https://github.com/microsoft/TypeScript/pull/50344#issuecomment-1229152304
Wesley Wigham (@weswigham)https://github.com/weswigham
Anders Hejlsberg (@ahejlsberg)https://github.com/ahejlsberg
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/50344
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
Aug 27, 2022 https://github.com/microsoft/TypeScript/pull/50344#pullrequestreview-1087659918
View reviewed changes https://github.com/microsoft/TypeScript/pull/50344/files/c75043eb12354d42dba4a4e17db9252645151fda
https://github.com/sandersn
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
a9797d2https://github.com/microsoft/TypeScript/commit/a9797d218d34fefc61b823d0e1dd24f6eb5363c8
Aug 31, 2022https://github.com/microsoft/TypeScript/pull/50344#event-7299996497
https://github.com/sandersn
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
Wesley Wigham (weswigham)https://github.com/weswigham
Aug 31, 2022https://github.com/microsoft/TypeScript/pull/50344#event-7299997543
https://github.com/ahejlsberg
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
Dec 1, 2022 https://github.com/microsoft/TypeScript/pull/50344#ref-issue-1470132826
Narrowing with typeof and optional chaining does not work specifically with a union containing boolean unless wrapped in parentheses #51700 https://github.com/microsoft/TypeScript/issues/51700
https://github.com/wbt
wbthttps://github.com/wbt
Jan 26, 2023 https://github.com/microsoft/TypeScript/pull/50344#ref-issue-1558808061
typeof ... === "undefined" check on mapped object member doesn't narrow correctly, for only some purposes #52440 https://github.com/microsoft/TypeScript/issues/52440
https://github.com/jakebailey
Jake Bailey (jakebailey)https://github.com/jakebailey
Apr 9, 2024 https://github.com/microsoft/TypeScript/pull/50344#ref-issue-467942096
Union not narrowed with typeof x.y as a discriminant #32399 https://github.com/microsoft/TypeScript/issues/32399
https://github.com/microsoft
Microsoft (microsoft)https://github.com/microsoft
Oct 22, 2025https://github.com/microsoft/TypeScript/pull/50344#event-20417583866
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%2F50344
https://github.com/weswigham
Wesley Wigham (weswigham) https://github.com/weswigham
https://github.com/microsoft/TypeScript/pull/50344/files/c75043eb12354d42dba4a4e17db9252645151fda
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser) https://github.com/DanielRosenwasser
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/50344
https://github.com/weswigham
Wesley Wigham (weswigham) https://github.com/weswigham
For Backlog Bug https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22For%20Backlog%20Bug%22
PR Backlog https://github.com/orgs/microsoft/projects/1252
typeof ... === "undefined" check on discriminated union of undefined and object type doesn't narrow correctly https://github.com/microsoft/TypeScript/issues/50340
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/50344
https://github.com/a-tarasyuk
https://github.com/DanielRosenwasser
https://github.com/typescript-bot
https://github.com/weswigham
https://github.com/sandersn
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.