| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_pull_requests_fragments |
| route-action | pull_request_layout |
| fetch-nonce | v2:e9371454-978a-b1f6-1a8e-fa93bc74f338 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E85E:15C084:3F3F2F:5609A1:6AFBEC42 |
| html-safe-nonce | f151ad1641c0292f07657a79e8316cd80de339830cc6f18141bdc2d11e0db7a7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODVFOjE1QzA4NDozRjNGMkY6NTYwOUExOjZBRkJFQzQyIiwidmlzaXRvcl9pZCI6IjcxMzA0MTg1NjY3NTAwMDYzMzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8abc675b0759d8e8da61f5c35e3bba5a393b2fec59dfcb716556a44065bfdb22 |
| hovercard-subject-tag | pull_request:53351022 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///voltron/pull_requests_fragments/pull_request_layout |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/microsoft/TypeScript/6062/pull_request_layout |
| twitter:image | https://opengraph.githubassets.com/8a85f1223f041ee45e03d52573ed643ce05598e6d4abd5b0d4bc8e882442f172/microsoft/TypeScript/pull/6062 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8a85f1223f041ee45e03d52573ed643ce05598e6d4abd5b0d4bc8e882442f172/microsoft/TypeScript/pull/6062 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | weswigham |
| hostname | github.com |
| expected-hostname | github.com |
| None | 744d4381b1c4dbd6d8736c7d7e5bbe7dc11217584e457a3555020c631764e8ec |
| turbo-cache-control | no-cache |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | df859c48a4c8b4c0009c19bb4e82101aacb4b998 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | pull-requests |
| Skip to content | https://github.com/microsoft/TypeScript/pull/6062#start-of-content |
| https://github.com/ |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fpull%2F6062 |
| GitHubRepository hosting, code review, and collaboration | https://github.com/platform |
| CopilotAI coding agent for tasks, projects, and automated work | https://github.com/features/copilot |
| ActionsCI/CD and automation | https://github.com/features/actions |
| Code QualityQuality analysis, fixes, and enforcement | https://github.com/features/code-quality |
| CodespacesCloud development environments | https://github.com/features/codespaces |
| Code SecurityVulnerability detection and remediation | https://github.com/security/advanced-security/code-security |
| Secret ProtectionSecret scanning and leak prevention | https://github.com/security/advanced-security/secret-protection |
| All Features | https://github.com/features |
| Documentation | https://docs.github.com/en |
| Training | https://learn.github.com/skills |
| Certifications | https://learn.github.com/credentials |
| Build with Copilot | https://github.com/features/ai |
| Customize Copilot | https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview |
| Integrations | https://github.com/marketplace |
| Trending repos | https://github.com/trending |
| GitHub Sponsors | https://github.com/open-source/sponsors |
| Developer articles | https://github.com/resources/articles |
| ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place. | https://github.blog/changelog/ |
| Enterprises | https://github.com/enterprise |
| Team | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| See all industries | https://github.com/solutions/industry |
| Why GitHub | https://github.com/why-github |
| Customer Stories | https://github.com/customer-stories |
| Business insights | https://github.com/solutions/executive-insights |
| Trust Center | https://github.com/trust-center |
| GitHub Advanced SecurityEnterprise-grade code security | https://github.com/security/advanced-security |
| Copilot for businessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/enterprise/premium-support |
| Documentation | https://docs.github.com/en |
| Resource center | https://github.com/resources |
| Blog | https://github.blog/ |
| Events & webinars | https://github.com/resources/events |
| Community Forum | https://github.com/orgs/community/discussions |
| Customer Stories | https://github.com/customer-stories |
| Integrations | https://github.com/marketplace |
| Customer support | https://help.github.com/ |
| Training | https://learn.github.com/skills |
| GitHub Status | https://www.githubstatus.com/ |
| About | https://github.com/about |
| Partners | https://github.com/partners |
| Changelog | https://github.blog/changelog/ |
| GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub. | https://githubuniverse.com/ |
| Pricing | https://github.com/pricing |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fpull%2F6062 |
| 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 |
| Reload | https://github.com/microsoft/TypeScript/pull/6062 |
| Reload | https://github.com/microsoft/TypeScript/pull/6062 |
| Reload | https://github.com/microsoft/TypeScript/pull/6062 |
| microsoft | https://github.com/microsoft |
| TypeScript | https://github.com/microsoft/TypeScript |
| Code | https://github.com/microsoft/TypeScript |
| Issues5k (5k) | https://github.com/microsoft/TypeScript/issues |
| Pull requests335 (335) | https://github.com/microsoft/TypeScript/pulls |
| Actions | https://github.com/microsoft/TypeScript/actions |
| Projects | https://github.com/microsoft/TypeScript/projects |
| Wiki | https://github.com/microsoft/TypeScript/wiki |
| Security and quality | https://github.com/microsoft/TypeScript/security |
| Insights | https://github.com/microsoft/TypeScript/pulse |
| https://github.com/microsoft/TypeScript |
| Wesley Wigham (weswigham) | https://github.com/weswigham |
| microsoft:master | https://github.com/microsoft/TypeScript/tree/master |
| weswigham:narrow-by-value | https://github.com/weswigham/TypeScript/tree/narrow-by-value |
| Conversation | https://github.com/microsoft/TypeScript/pull/6062 |
| Commits7 (7) | https://github.com/microsoft/TypeScript/pull/6062/commits |
| Checks | https://github.com/microsoft/TypeScript/pull/6062/checks |
| Files changed | https://github.com/microsoft/TypeScript/pull/6062/files |
| WIP: Member-type based type guards | https://github.com/microsoft/TypeScript/pull/6062#top |
| Wesley Wigham (weswigham) | https://github.com/weswigham |
| microsoft:master | https://github.com/microsoft/TypeScript/tree/master |
| weswigham:narrow-by-value | https://github.com/weswigham/TypeScript/tree/narrow-by-value |
|
| https://github.com/weswigham |
| Wesley Wigham (weswigham) | https://github.com/weswigham |
| Dec 11, 2015 | https://github.com/microsoft/TypeScript/pull/6062#issue-121631901 |
| Please reload this page | https://github.com/microsoft/TypeScript/pull/6062 |
| #186 | https://github.com/microsoft/TypeScript/issues/186 |
| Daniel Rosenwasser (@DanielRosenwasser) | https://github.com/DanielRosenwasser |
| Mohamed Hegazy (@mhegazy) | https://github.com/mhegazy |
| roadmap | https://github.com/Microsoft/TypeScript/wiki/Roadmap |
| Please reload this page | https://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, 2015 | https://github.com/microsoft/TypeScript/pull/6062#event-488961041 |
| DanielRosenwasser | https://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.ts | https://github.com/microsoft/TypeScript/pull/6062/files#diff-d9ab6589e714c71e657f601cf30ff51dfc607fc98419bf72e04f6b0fa92cc4b8 |
| Daniel Rosenwasser (DanielRosenwasser) | https://github.com/DanielRosenwasser |
| Dec 11, 2015 | https://github.com/microsoft/TypeScript/pull/6062#discussion_r47322563 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/microsoft/TypeScript/pull/6062 |
| https://github.com/DanielRosenwasser |
| Daniel Rosenwasser (DanielRosenwasser) | https://github.com/DanielRosenwasser |
| Dec 12, 2015 | https://github.com/microsoft/TypeScript/pull/6062#issuecomment-164089466 |
| Please reload this page | https://github.com/microsoft/TypeScript/pull/6062 |
| https://github.com/weswigham |
| Wesley Wigham (weswigham) | https://github.com/weswigham |
| Dec 12, 2015 | https://github.com/microsoft/TypeScript/pull/6062#issuecomment-164094640 |
| Daniel Rosenwasser (@DanielRosenwasser) | https://github.com/DanielRosenwasser |
| Please reload this page | https://github.com/microsoft/TypeScript/pull/6062 |
| https://github.com/DanielRosenwasser |
| Daniel Rosenwasser (DanielRosenwasser) | https://github.com/DanielRosenwasser |
| Dec 22, 2015 | https://github.com/microsoft/TypeScript/pull/6062#issuecomment-166476597 |
| Wesley Wigham (@weswigham) | https://github.com/weswigham |
| #6196 | https://github.com/microsoft/TypeScript/pull/6196 |
| Please reload this page | https://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, 2016 | https://github.com/microsoft/TypeScript/pull/6062#issuecomment-213740048 |
| #8010 | https://github.com/microsoft/TypeScript/pull/8010 |
| Please reload this page | https://github.com/microsoft/TypeScript/pull/6062 |
| https://github.com/basarat |
| Basarat Ali Syed (basarat) | https://github.com/basarat |
| Apr 24, 2016 | https://github.com/microsoft/TypeScript/pull/6062#issuecomment-213864586 |
| #8010 | https://github.com/microsoft/TypeScript/pull/8010 |
| https://cloud.githubusercontent.com/assets/874898/14765033/83782242-0a12-11e6-80ec-bbe449d01472.png |
| Please reload this page | https://github.com/microsoft/TypeScript/pull/6062 |
| https://github.com/weswigham |
| Wesley Wigham (weswigham) | https://github.com/weswigham |
| Apr 24, 2016 | https://github.com/microsoft/TypeScript/pull/6062#issuecomment-213866897 |
| #8010 | https://github.com/microsoft/TypeScript/pull/8010 |
| Please reload this page | https://github.com/microsoft/TypeScript/pull/6062 |
| Wesley Wigham (weswigham) | https://github.com/weswigham |
| April 26, 2016 04:45 | https://github.com/microsoft/TypeScript/pull/6062#commits-pushed-b3db6ff |
|
| https://github.com/weswigham |
| initial pass at equality as member type guards | https://github.com/microsoft/TypeScript/pull/6062/commits/b3db6ff16fe9e395d4e573f32e88216fc21a27c2 |
| b3db6ff | https://github.com/microsoft/TypeScript/pull/6062/commits/b3db6ff16fe9e395d4e573f32e88216fc21a27c2 |
|
| https://github.com/weswigham |
| accept present baselines so output for new tests is captured | https://github.com/microsoft/TypeScript/pull/6062/commits/6e29b517c1915580728739864d5d7f6743d7ae14 |
| 6e29b51 | https://github.com/microsoft/TypeScript/pull/6062/commits/6e29b517c1915580728739864d5d7f6743d7ae14 |
|
| https://github.com/weswigham |
| improve style/names | https://github.com/microsoft/TypeScript/pull/6062/commits/f88606adc9852d4e8d1fb921f020f35bbc5b4af8 |
| f88606a | https://github.com/microsoft/TypeScript/pull/6062/commits/f88606adc9852d4e8d1fb921f020f35bbc5b4af8 |
|
| https://github.com/weswigham |
| Remove awful merge conflicts | https://github.com/microsoft/TypeScript/pull/6062/commits/74f3bd0f94516d9dd64dee6123f75c02b1896627 |
| 74f3bd0 | https://github.com/microsoft/TypeScript/pull/6062/commits/74f3bd0f94516d9dd64dee6123f75c02b1896627 |
| https://github.com/weswigham |
| Wesley Wigham (weswigham) | https://github.com/weswigham |
| force-pushed | https://github.com/microsoft/TypeScript/compare/a87adee71c11d955faa3d0a802a0ef41b2d9df53..0e30aa1c871fd7bac81c1ec1a13a22d904652c86 |
| a87adee | https://github.com/microsoft/TypeScript/commit/a87adee71c11d955faa3d0a802a0ef41b2d9df53 |
| 0e30aa1 | https://github.com/microsoft/TypeScript/commit/0e30aa1c871fd7bac81c1ec1a13a22d904652c86 |
|
Compare
| https://github.com/microsoft/TypeScript/compare/a87adee71c11d955faa3d0a802a0ef41b2d9df53..0e30aa1c871fd7bac81c1ec1a13a22d904652c86 |
| April 26, 2016 11:24 | https://github.com/microsoft/TypeScript/pull/6062#event-641336645 |
|
| https://github.com/weswigham |
| Reconcile member-guards with CFA work | https://github.com/microsoft/TypeScript/pull/6062/commits/6636b7b003e56488f7d9ce811c0aa759666b0fa7 |
| 6636b7b | https://github.com/microsoft/TypeScript/pull/6062/commits/6636b7b003e56488f7d9ce811c0aa759666b0fa7 |
| https://github.com/weswigham |
| Wesley Wigham (weswigham) | https://github.com/weswigham |
| force-pushed | https://github.com/microsoft/TypeScript/compare/0e30aa1c871fd7bac81c1ec1a13a22d904652c86..6636b7b003e56488f7d9ce811c0aa759666b0fa7 |
| 0e30aa1 | https://github.com/microsoft/TypeScript/commit/0e30aa1c871fd7bac81c1ec1a13a22d904652c86 |
| 6636b7b | https://github.com/microsoft/TypeScript/commit/6636b7b003e56488f7d9ce811c0aa759666b0fa7 |
|
Compare
| https://github.com/microsoft/TypeScript/compare/0e30aa1c871fd7bac81c1ec1a13a22d904652c86..6636b7b003e56488f7d9ce811c0aa759666b0fa7 |
| April 26, 2016 11:28 | https://github.com/microsoft/TypeScript/pull/6062#event-641340728 |
|
| https://github.com/weswigham |
| This shouldnt have changed | https://github.com/microsoft/TypeScript/pull/6062/commits/dbe2a5513901fa9c6218445bdd05aa1b8d85fb50 |
| dbe2a55 | https://github.com/microsoft/TypeScript/pull/6062/commits/dbe2a5513901fa9c6218445bdd05aa1b8d85fb50 |
| https://github.com/weswigham |
| Wesley Wigham (weswigham) | https://github.com/weswigham |
| Apr 26, 2016 | https://github.com/microsoft/TypeScript/pull/6062#issuecomment-214712148 |
| Please reload this page | https://github.com/microsoft/TypeScript/pull/6062 |
| Please reload this page | https://github.com/microsoft/TypeScript/pull/6062 |
|
| https://github.com/weswigham |
| Tentatively accept test baseline | https://github.com/microsoft/TypeScript/pull/6062/commits/bca9c33045450bb9b9df72cdd686cf2780226d10 |
| bca9c33 | https://github.com/microsoft/TypeScript/pull/6062/commits/bca9c33045450bb9b9df72cdd686cf2780226d10 |
| https://github.com/weswigham |
| Wesley Wigham (weswigham) | https://github.com/weswigham |
| Apr 26, 2016 | https://github.com/microsoft/TypeScript/pull/6062#issuecomment-214714261 |
| Daniel Rosenwasser (@DanielRosenwasser) | https://github.com/DanielRosenwasser |
| Please reload this page | https://github.com/microsoft/TypeScript/pull/6062 |
| https://github.co/hiddenchars |
| https://github.com/microsoft/TypeScript/pull/{{ revealButtonHref }} |
| Sign up for free | https://github.com/join?source=comment-repo |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fpull%2F6062 |
| Please reload this page | https://github.com/microsoft/TypeScript/pull/6062 |
| Please reload this page | https://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 |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |