René's URL Explorer Experiment


Title: WIP: Member-type based type guards by weswigham · Pull Request #6062 · microsoft/TypeScript · GitHub

Open Graph Title: WIP: Member-type based type guards by weswigham · Pull Request #6062 · microsoft/TypeScript

X Title: WIP: Member-type based type guards by weswigham · Pull Request #6062 · microsoft/TypeScript

Description: TypeScript is a superset of JavaScript that compiles to clean JavaScript output. - WIP: Member-type based type guards by weswigham · Pull Request #6062 · microsoft/TypeScript

Open Graph Description: This PR adds type guards of the form: if (foo.bar.kind === discriminatorType) { // foo potentially narrowed } Related issues: #186, probably more. Known issues/TODOs: Comparing against a string...

X Description: This PR adds type guards of the form: if (foo.bar.kind === discriminatorType) { // foo potentially narrowed } Related issues: #186, probably more. Known issues/TODOs: Comparing against a string...

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

X: @github

direct link

Domain: github.com

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:e9371454-978a-b1f6-1a8e-fa93bc74f338
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE85E:15C084:3F3F2F:5609A1:6AFBEC42
html-safe-noncef151ad1641c0292f07657a79e8316cd80de339830cc6f18141bdc2d11e0db7a7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODVFOjE1QzA4NDozRjNGMkY6NTYwOUExOjZBRkJFQzQyIiwidmlzaXRvcl9pZCI6IjcxMzA0MTg1NjY3NTAwMDYzMzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac8abc675b0759d8e8da61f5c35e3bba5a393b2fec59dfcb716556a44065bfdb22
hovercard-subject-tagpull_request:53351022
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/6062/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/8a85f1223f041ee45e03d52573ed643ce05598e6d4abd5b0d4bc8e882442f172/microsoft/TypeScript/pull/6062
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8a85f1223f041ee45e03d52573ed643ce05598e6d4abd5b0d4bc8e882442f172/microsoft/TypeScript/pull/6062
og:image:altThis PR adds type guards of the form: if (foo.bar.kind === discriminatorType) { // foo potentially narrowed } Related issues: #186, probably more. Known issues/TODOs: Comparing against a string...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameweswigham
hostnamegithub.com
expected-hostnamegithub.com
None744d4381b1c4dbd6d8736c7d7e5bbe7dc11217584e457a3555020c631764e8ec
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
releasedf859c48a4c8b4c0009c19bb4e82101aacb4b998
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/pull/6062#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fpull%2F6062
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%2F6062
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/6062
Reloadhttps://github.com/microsoft/TypeScript/pull/6062
Reloadhttps://github.com/microsoft/TypeScript/pull/6062
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests335 (335)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/pulse
https://github.com/microsoft/TypeScript
Wesley Wigham (weswigham)https://github.com/weswigham
microsoft:masterhttps://github.com/microsoft/TypeScript/tree/master
weswigham:narrow-by-valuehttps://github.com/weswigham/TypeScript/tree/narrow-by-value
Conversationhttps://github.com/microsoft/TypeScript/pull/6062
Commits7 (7)https://github.com/microsoft/TypeScript/pull/6062/commits
Checkshttps://github.com/microsoft/TypeScript/pull/6062/checks
Files changedhttps://github.com/microsoft/TypeScript/pull/6062/files
WIP: Member-type based type guardshttps://github.com/microsoft/TypeScript/pull/6062#top
Wesley Wigham (weswigham)https://github.com/weswigham
microsoft:masterhttps://github.com/microsoft/TypeScript/tree/master
weswigham:narrow-by-valuehttps://github.com/weswigham/TypeScript/tree/narrow-by-value
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
Dec 11, 2015https://github.com/microsoft/TypeScript/pull/6062#issue-121631901
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/6062
#186https://github.com/microsoft/TypeScript/issues/186
Daniel Rosenwasser (@DanielRosenwasser)https://github.com/DanielRosenwasser
Mohamed Hegazy (@mhegazy)https://github.com/mhegazy
roadmaphttps://github.com/Microsoft/TypeScript/wiki/Roadmap
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/6062
https://github.com/msftclas
Microsoft Contribution License Agreements (msftclas)https://github.com/msftclas
cla-already-signed https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3Acla-already-signed
Dec 11, 2015https://github.com/microsoft/TypeScript/pull/6062#event-488961041
DanielRosenwasserhttps://github.com/DanielRosenwasser
Dec 11, 2015 https://github.com/microsoft/TypeScript/pull/6062#discussion-diff-47322563
View reviewed changes https://github.com/microsoft/TypeScript/pull/6062/files/7e79bcdcc5d789e556238952e71bdbfdcf7b1b85#diff-d9ab6589e714c71e657f601cf30ff51dfc607fc98419bf72e04f6b0fa92cc4b8
src/compiler/checker.tshttps://github.com/microsoft/TypeScript/pull/6062/files#diff-d9ab6589e714c71e657f601cf30ff51dfc607fc98419bf72e04f6b0fa92cc4b8
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
Dec 11, 2015https://github.com/microsoft/TypeScript/pull/6062#discussion_r47322563
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/6062
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
Dec 12, 2015https://github.com/microsoft/TypeScript/pull/6062#issuecomment-164089466
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/6062
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
Dec 12, 2015https://github.com/microsoft/TypeScript/pull/6062#issuecomment-164094640
Daniel Rosenwasser (@DanielRosenwasser)https://github.com/DanielRosenwasser
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/6062
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
Dec 22, 2015https://github.com/microsoft/TypeScript/pull/6062#issuecomment-166476597
Wesley Wigham (@weswigham)https://github.com/weswigham
#6196https://github.com/microsoft/TypeScript/pull/6196
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/6062
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
Jan 21, 2016 https://github.com/microsoft/TypeScript/pull/6062#ref-issue-38381463
Suggestion: sum types / tagged union #186 https://github.com/microsoft/TypeScript/issues/186
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
Mar 11, 2016 https://github.com/microsoft/TypeScript/pull/6062#ref-issue-139643419
make the strict equality comparison operator a typeguard for string literal types #7447 https://github.com/microsoft/TypeScript/issues/7447
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
Apr 5, 2016 https://github.com/microsoft/TypeScript/pull/6062#ref-pullrequest-110547529
String literal types #5185 https://github.com/microsoft/TypeScript/pull/5185
https://github.com/mquandalle
Maxime Quandalle (mquandalle)https://github.com/mquandalle
Apr 23, 2016https://github.com/microsoft/TypeScript/pull/6062#issuecomment-213740048
#8010https://github.com/microsoft/TypeScript/pull/8010
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/6062
https://github.com/basarat
Basarat Ali Syed (basarat)https://github.com/basarat
Apr 24, 2016https://github.com/microsoft/TypeScript/pull/6062#issuecomment-213864586
#8010https://github.com/microsoft/TypeScript/pull/8010
https://cloud.githubusercontent.com/assets/874898/14765033/83782242-0a12-11e6-80ec-bbe449d01472.png
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/6062
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
Apr 24, 2016https://github.com/microsoft/TypeScript/pull/6062#issuecomment-213866897
#8010https://github.com/microsoft/TypeScript/pull/8010
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/6062
Wesley Wigham (weswigham)https://github.com/weswigham
April 26, 2016 04:45https://github.com/microsoft/TypeScript/pull/6062#commits-pushed-b3db6ff
https://github.com/weswigham
initial pass at equality as member type guardshttps://github.com/microsoft/TypeScript/pull/6062/commits/b3db6ff16fe9e395d4e573f32e88216fc21a27c2
b3db6ffhttps://github.com/microsoft/TypeScript/pull/6062/commits/b3db6ff16fe9e395d4e573f32e88216fc21a27c2
https://github.com/weswigham
accept present baselines so output for new tests is capturedhttps://github.com/microsoft/TypeScript/pull/6062/commits/6e29b517c1915580728739864d5d7f6743d7ae14
6e29b51https://github.com/microsoft/TypeScript/pull/6062/commits/6e29b517c1915580728739864d5d7f6743d7ae14
https://github.com/weswigham
improve style/nameshttps://github.com/microsoft/TypeScript/pull/6062/commits/f88606adc9852d4e8d1fb921f020f35bbc5b4af8
f88606ahttps://github.com/microsoft/TypeScript/pull/6062/commits/f88606adc9852d4e8d1fb921f020f35bbc5b4af8
https://github.com/weswigham
Remove awful merge conflictshttps://github.com/microsoft/TypeScript/pull/6062/commits/74f3bd0f94516d9dd64dee6123f75c02b1896627
74f3bd0https://github.com/microsoft/TypeScript/pull/6062/commits/74f3bd0f94516d9dd64dee6123f75c02b1896627
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
force-pushedhttps://github.com/microsoft/TypeScript/compare/a87adee71c11d955faa3d0a802a0ef41b2d9df53..0e30aa1c871fd7bac81c1ec1a13a22d904652c86
a87adeehttps://github.com/microsoft/TypeScript/commit/a87adee71c11d955faa3d0a802a0ef41b2d9df53
0e30aa1https://github.com/microsoft/TypeScript/commit/0e30aa1c871fd7bac81c1ec1a13a22d904652c86
Compare https://github.com/microsoft/TypeScript/compare/a87adee71c11d955faa3d0a802a0ef41b2d9df53..0e30aa1c871fd7bac81c1ec1a13a22d904652c86
April 26, 2016 11:24https://github.com/microsoft/TypeScript/pull/6062#event-641336645
https://github.com/weswigham
Reconcile member-guards with CFA workhttps://github.com/microsoft/TypeScript/pull/6062/commits/6636b7b003e56488f7d9ce811c0aa759666b0fa7
6636b7bhttps://github.com/microsoft/TypeScript/pull/6062/commits/6636b7b003e56488f7d9ce811c0aa759666b0fa7
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
force-pushedhttps://github.com/microsoft/TypeScript/compare/0e30aa1c871fd7bac81c1ec1a13a22d904652c86..6636b7b003e56488f7d9ce811c0aa759666b0fa7
0e30aa1https://github.com/microsoft/TypeScript/commit/0e30aa1c871fd7bac81c1ec1a13a22d904652c86
6636b7bhttps://github.com/microsoft/TypeScript/commit/6636b7b003e56488f7d9ce811c0aa759666b0fa7
Compare https://github.com/microsoft/TypeScript/compare/0e30aa1c871fd7bac81c1ec1a13a22d904652c86..6636b7b003e56488f7d9ce811c0aa759666b0fa7
April 26, 2016 11:28https://github.com/microsoft/TypeScript/pull/6062#event-641340728
https://github.com/weswigham
This shouldnt have changedhttps://github.com/microsoft/TypeScript/pull/6062/commits/dbe2a5513901fa9c6218445bdd05aa1b8d85fb50
dbe2a55https://github.com/microsoft/TypeScript/pull/6062/commits/dbe2a5513901fa9c6218445bdd05aa1b8d85fb50
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
Apr 26, 2016https://github.com/microsoft/TypeScript/pull/6062#issuecomment-214712148
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/6062
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/6062
https://github.com/weswigham
Tentatively accept test baselinehttps://github.com/microsoft/TypeScript/pull/6062/commits/bca9c33045450bb9b9df72cdd686cf2780226d10
bca9c33https://github.com/microsoft/TypeScript/pull/6062/commits/bca9c33045450bb9b9df72cdd686cf2780226d10
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
Apr 26, 2016https://github.com/microsoft/TypeScript/pull/6062#issuecomment-214714261
Daniel Rosenwasser (@DanielRosenwasser)https://github.com/DanielRosenwasser
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/6062
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%2F6062
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/6062
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/6062
https://github.com/weswigham
https://github.com/DanielRosenwasser
https://github.com/mquandalle
https://github.com/basarat
https://github.com/Lenne231
https://github.com/msftclas
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.