René's URL Explorer Experiment


Title: Bring typeof switch behaviour inline with if by jack-williams · Pull Request #27182 · microsoft/TypeScript · GitHub

Open Graph Title: Bring typeof switch behaviour inline with if by jack-williams · Pull Request #27182 · microsoft/TypeScript

X Title: Bring typeof switch behaviour inline with if by jack-williams · Pull Request #27182 · microsoft/TypeScript

Description: TypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Bring typeof switch behaviour inline with if by jack-williams · Pull Request #27182 · microsoft/TypeScript

Open Graph Description: This PR has now morphed into something that bundles a couples of changes to essentially bring switch narrowing inline with if, which was recently updated in two keys ways: unknown narrowing for &q...

X Description: This PR has now morphed into something that bundles a couples of changes to essentially bring switch narrowing inline with if, which was recently updated in two keys ways: unknown narrowing for &a...

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

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:ef23832c-fa3b-717f-d272-27ea27704f37
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9EEC:2ADBAC:45393A:5D5667:6B049AD5
html-safe-nonce9a6db066061762bb23d7458879cbaef2866f1e413ac26b3d839c9517a41e6a84
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RUVDOjJBREJBQzo0NTM5M0E6NUQ1NjY3OjZCMDQ5QUQ1IiwidmlzaXRvcl9pZCI6IjQwODEwNDg3MzY4MzYyMjYxMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac93ad480d197a670da3c55989dbfae5cc63cc2a77bfa101af3e82205a46c96127
hovercard-subject-tagpull_request:216258192
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/27182/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/033e3dbc8613e6b4019ea5dafe0bf88f26b6dadbbd2f4137b22fe506ea174e69/microsoft/TypeScript/pull/27182
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/033e3dbc8613e6b4019ea5dafe0bf88f26b6dadbbd2f4137b22fe506ea174e69/microsoft/TypeScript/pull/27182
og:image:altThis PR has now morphed into something that bundles a couples of changes to essentially bring switch narrowing inline with if, which was recently updated in two keys ways: unknown narrowing for &q...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejack-williams
hostnamegithub.com
expected-hostnamegithub.com
None9784b6f42e2d5eac4e394fa88cad134c0dc5b6662b4ff2787a1ed1ef5a96331d
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
release3fd14143b75b2af7b76bbd23b069867d091adfcc
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/pull/27182#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fpull%2F27182
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%2F27182
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/27182
Reloadhttps://github.com/microsoft/TypeScript/pull/27182
Reloadhttps://github.com/microsoft/TypeScript/pull/27182
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests318 (318)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
Jack Williams (jack-williams)https://github.com/jack-williams
microsoft:masterhttps://github.com/microsoft/TypeScript/tree/master
jack-williams:correct-narrowing-for-typeof-unknown-in-switchhttps://github.com/jack-williams/TypeScript/tree/correct-narrowing-for-typeof-unknown-in-switch
Conversationhttps://github.com/microsoft/TypeScript/pull/27182
Commits10 (10)https://github.com/microsoft/TypeScript/pull/27182/commits
Checkshttps://github.com/microsoft/TypeScript/pull/27182/checks
Files changedhttps://github.com/microsoft/TypeScript/pull/27182/files
Bring typeof switch behaviour inline with ifhttps://github.com/microsoft/TypeScript/pull/27182#top
Jack Williams (jack-williams)https://github.com/jack-williams
microsoft:masterhttps://github.com/microsoft/TypeScript/tree/master
jack-williams:correct-narrowing-for-typeof-unknown-in-switchhttps://github.com/jack-williams/TypeScript/tree/correct-narrowing-for-typeof-unknown-in-switch
https://github.com/jack-williams
Jack Williams (jack-williams)https://github.com/jack-williams
Sep 18, 2018https://github.com/microsoft/TypeScript/pull/27182#issue-361238099
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/27182
#27180https://github.com/microsoft/TypeScript/issues/27180
#27335https://github.com/microsoft/TypeScript/issues/27335
#27181https://github.com/microsoft/TypeScript/issues/27181
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/27182
Jack Williams (jack-williams)https://github.com/jack-williams
September 18, 2018 10:45https://github.com/microsoft/TypeScript/pull/27182#commits-pushed-3f103f5
https://github.com/jack-williams
Fix typeof switch narrowinghttps://github.com/microsoft/TypeScript/pull/27182/commits/3f103f5c8496a2ed570cace1bb7e1c297e8002a7
3f103f5https://github.com/microsoft/TypeScript/pull/27182/commits/3f103f5c8496a2ed570cace1bb7e1c297e8002a7
https://github.com/jack-williams
Change keyof ts to actually exhibit behaviourhttps://github.com/microsoft/TypeScript/pull/27182/commits/026549ee71d02b6e502f85c4b90fe6a9ef9f5440
026549ehttps://github.com/microsoft/TypeScript/pull/27182/commits/026549ee71d02b6e502f85c4b90fe6a9ef9f5440
https://github.com/jack-williams
Rename function to match type variablehttps://github.com/microsoft/TypeScript/pull/27182/commits/fe78b43f5cda7a27fb8da8e05f340ef3afaa3755
fe78b43https://github.com/microsoft/TypeScript/pull/27182/commits/fe78b43f5cda7a27fb8da8e05f340ef3afaa3755
https://github.com/jack-williams
Don't narrow any to Functionhttps://github.com/microsoft/TypeScript/pull/27182/commits/cca83dcff28992719aff7e40b7bb2b5614c5c461
cca83dchttps://github.com/microsoft/TypeScript/pull/27182/commits/cca83dcff28992719aff7e40b7bb2b5614c5c461
https://github.com/jack-williams
Change fallback type from never to unknownhttps://github.com/microsoft/TypeScript/pull/27182/commits/e826824a876b7fb60c01e253ac897bc31b50535c
e826824https://github.com/microsoft/TypeScript/pull/27182/commits/e826824a876b7fb60c01e253ac897bc31b50535c
https://github.com/jack-williams
Actually change fallback to candidate type otherwise any narrowing br…https://github.com/microsoft/TypeScript/pull/27182/commits/a55d6fb2dfd2b339341f42e58540e54020fe3c11
a55d6fbhttps://github.com/microsoft/TypeScript/pull/27182/commits/a55d6fb2dfd2b339341f42e58540e54020fe3c11
https://github.com/jack-williams
Jack Williams (jack-williams)https://github.com/jack-williams
Sep 18, 2018 https://github.com/microsoft/TypeScript/pull/27182#ref-issue-361237816
Switch on typeof for keyof type loses information #27181 https://github.com/microsoft/TypeScript/issues/27181
https://github.com/jack-williams
Remove fix for keyof types, fixed byhttps://github.com/microsoft/TypeScript/pull/27182/commits/b6a836adeed6a54c040f41507fbbfd4b8c7843e6
microsoft#27157https://github.com/microsoft/TypeScript/pull/27157
b6a836ahttps://github.com/microsoft/TypeScript/pull/27182/commits/b6a836adeed6a54c040f41507fbbfd4b8c7843e6
https://github.com/jack-williams
Jack Williams (jack-williams)https://github.com/jack-williams
Sep 18, 2018https://github.com/microsoft/TypeScript/pull/27182#event-1852514494
Jack Williams (jack-williams)https://github.com/jack-williams
September 18, 2018 15:25https://github.com/microsoft/TypeScript/pull/27182#commits-pushed-6fdc7e3
https://github.com/jack-williams
getBaseConstraintOfType -> getBaseConstraintOrTypehttps://github.com/microsoft/TypeScript/pull/27182/commits/6fdc7e3da470da6ed5680f9731fc12026191affc
6fdc7e3https://github.com/microsoft/TypeScript/pull/27182/commits/6fdc7e3da470da6ed5680f9731fc12026191affc
https://github.com/jack-williams
Merge branch 'master' into correct-narrowing-for-typeof-unknown-in-sw…https://github.com/microsoft/TypeScript/pull/27182/commits/356bba14ba3b23bf6550ee0352f4606d5c5900f9
356bba1https://github.com/microsoft/TypeScript/pull/27182/commits/356bba14ba3b23bf6550ee0352f4606d5c5900f9
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
TypeScript 3.2https://github.com/microsoft/TypeScript/milestone/77
Sep 18, 2018https://github.com/microsoft/TypeScript/pull/27182#event-1853527457
https://github.com/jack-williams
Jack Williams (jack-williams)https://github.com/jack-williams
Sep 18, 2018https://github.com/microsoft/TypeScript/pull/27182#issuecomment-422584744
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/27182
https://github.com/jack-williams
Jack Williams (jack-williams)https://github.com/jack-williams
Sep 25, 2018https://github.com/microsoft/TypeScript/pull/27182#event-1865265126
https://github.com/jack-williams
Jack Williams (jack-williams)https://github.com/jack-williams
Sep 25, 2018https://github.com/microsoft/TypeScript/pull/27182#event-1865265486
https://github.com/jack-williams
Narrow union members aswell as filterhttps://github.com/microsoft/TypeScript/pull/27182/commits/88a4fdfdacbed87d43a198ace616a314e60f768c
88a4fdfhttps://github.com/microsoft/TypeScript/pull/27182/commits/88a4fdfdacbed87d43a198ace616a314e60f768c
https://github.com/jack-williams
Jack Williams (jack-williams)https://github.com/jack-williams
force-pushedhttps://github.com/microsoft/TypeScript/compare/b4344f74104bf359bf51af581aa80a792bb4f80c..88a4fdfdacbed87d43a198ace616a314e60f768c
b4344f7https://github.com/microsoft/TypeScript/commit/b4344f74104bf359bf51af581aa80a792bb4f80c
88a4fdfhttps://github.com/microsoft/TypeScript/commit/88a4fdfdacbed87d43a198ace616a314e60f768c
Compare https://github.com/microsoft/TypeScript/compare/b4344f74104bf359bf51af581aa80a792bb4f80c..88a4fdfdacbed87d43a198ace616a314e60f768c
October 4, 2018 10:13https://github.com/microsoft/TypeScript/pull/27182#event-1884189052
https://github.com/justingrant
Justin Grant (justingrant)https://github.com/justingrant
Oct 5, 2018https://github.com/microsoft/TypeScript/pull/27182#issuecomment-427469597
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/27182
Jack Williams (@jack-williams)https://github.com/jack-williams
Ryan Cavanaugh (@RyanCavanaugh)https://github.com/RyanCavanaugh
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/27182
https://github.com/jack-williams
Jack Williams (jack-williams)https://github.com/jack-williams
Oct 5, 2018https://github.com/microsoft/TypeScript/pull/27182#issuecomment-427475596
Justin Grant (@justingrant)https://github.com/justingrant
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/27182
https://github.com/justingrant
Justin Grant (justingrant)https://github.com/justingrant
Oct 5, 2018https://github.com/microsoft/TypeScript/pull/27182#issuecomment-427482637
Jack Williams (@jack-williams)https://github.com/jack-williams
#24091https://github.com/microsoft/TypeScript/issues/24091
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/27182
https://github.com/jack-williams
Jack Williams (jack-williams)https://github.com/jack-williams
Oct 10, 2018https://github.com/microsoft/TypeScript/pull/27182#issuecomment-428501715
Ryan Cavanaugh (@RyanCavanaugh)https://github.com/RyanCavanaugh
#27680https://github.com/microsoft/TypeScript/pull/27680
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/27182
https://github.com/jack-williams
Jack Williams (jack-williams)https://github.com/jack-williams
Oct 10, 2018https://github.com/microsoft/TypeScript/pull/27182#event-1894966761
https://github.com/microsoft
Microsoft (microsoft)https://github.com/microsoft
Oct 21, 2025https://github.com/microsoft/TypeScript/pull/27182#event-20415801165
https://github.com/typescript-bot
TypeScript Bot (typescript-bot)https://github.com/typescript-bot
Wesley Wigham (weswigham)https://github.com/weswigham
Oct 21, 2025https://github.com/microsoft/TypeScript/pull/27182#event-20415802108
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%2F27182
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/27182
https://github.com/weswigham
Wesley Wigham (weswigham) https://github.com/weswigham
TypeScript 3.2 https://github.com/microsoft/TypeScript/milestone/77
typeof switch filters union types but does not narrow them https://github.com/microsoft/TypeScript/issues/27335
Switch on typeof does not narrow unknown correctly. https://github.com/microsoft/TypeScript/issues/27180
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/27182
https://github.com/jack-williams
https://github.com/justingrant
https://github.com/weswigham
https://github.com/RyanCavanaugh
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.