Title: Mutually exclusive guard constraints and 'never' · Issue #9869 · microsoft/TypeScript · GitHub
Open Graph Title: Mutually exclusive guard constraints and 'never' · Issue #9869 · microsoft/TypeScript
X Title: Mutually exclusive guard constraints and 'never' · Issue #9869 · microsoft/TypeScript
Description: Applying two mutually exclusive guard constraints doesn't lead to 'never' type in the following case: function ololo() { let stringOrNumber: string | number = 3 > 5 ? "a" : 7; if (typeof stringOrNumber === "number") { if (typeof stringOr...
Open Graph Description: Applying two mutually exclusive guard constraints doesn't lead to 'never' type in the following case: function ololo() { let stringOrNumber: string | number = 3 > 5 ? "a" : 7; if (typeof stringOrNu...
X Description: Applying two mutually exclusive guard constraints doesn't lead to 'never' type in the following case: function ololo() { let stringOrNumber: string | number = 3 > 5 ? "a" :...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/9869
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Mutually exclusive guard constraints and 'never'","articleBody":"Applying two mutually exclusive guard constraints doesn't lead to 'never' type in the following case:\n\n``` ts\nfunction ololo() {\n let stringOrNumber: string | number = 3 > 5 ? \"a\" : 7;\n\n if (typeof stringOrNumber === \"number\") {\n if (typeof stringOrNumber !== \"number\") {\n stringOrNumber; // shouldn't this be 'never'?\n }\n } \n```\n\nSeems that it should.\n","author":{"url":"https://github.com/zhuravlikjb","@type":"Person","name":"zhuravlikjb"},"datePublished":"2016-07-21T15:56:59Z","url":"https://github.com/microsoft/TypeScript/issues/9869"}
| 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/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:94c9f7b6-cb47-c53f-ab1e-c61f394822b2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A5BA:CE438:38277A:4BD88D:6B019FD3 |
| html-safe-nonce | 19013966b9c7bf7e9155ab903447954d0810d14b93defc57bd22790ef347b040 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNUJBOkNFNDM4OjM4Mjc3QTo0QkQ4OEQ6NkIwMTlGRDMiLCJ2aXNpdG9yX2lkIjoiNDcxNDk4OTA3NjEzNzIyMjA5OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c5afc0ddf0795307c3a4f85d46af2328aaf0fae2800cba7ead13217f6a277aed |
| hovercard-subject-tag | issue:166855679 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/9869/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4af76f0b9bb4fe3bddbbf15de7acb170f74ec55d7dccdec914a0193745a215fd/microsoft/TypeScript/issues/9869 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4af76f0b9bb4fe3bddbbf15de7acb170f74ec55d7dccdec914a0193745a215fd/microsoft/TypeScript/issues/9869 |
| og:image:alt | Applying two mutually exclusive guard constraints doesn't lead to 'never' type in the following case: function ololo() { let stringOrNumber: string | number = 3 > 5 ? "a" : 7; if (typeof stringOrNu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | zhuravlikjb |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width