Title: Typeof comparison expression should check right hand side value · Issue #9506 · microsoft/TypeScript · GitHub
Open Graph Title: Typeof comparison expression should check right hand side value · Issue #9506 · microsoft/TypeScript
X Title: Typeof comparison expression should check right hand side value · Issue #9506 · microsoft/TypeScript
Description: As I understood typeof operator can only return undefined, object, boolean, number, string, symbol, function. If the RHS is a string literal, I think it should check against the above values and throw an error on: const str = 'str'; if (...
Open Graph Description: As I understood typeof operator can only return undefined, object, boolean, number, string, symbol, function. If the RHS is a string literal, I think it should check against the above values and th...
X Description: As I understood typeof operator can only return undefined, object, boolean, number, string, symbol, function. If the RHS is a string literal, I think it should check against the above values and th...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/9506
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Typeof comparison expression should check right hand side value","articleBody":"As I understood `typeof` operator can only return `undefined`, `object`, `boolean`, `number`, `string`, `symbol`, `function.`\n\nIf the RHS is a string literal, I think it should check against the above values and throw an error on:\n\n``` ts\nconst str = 'str';\nif (typeof str === 'd') {// error right hand side can only be `undefined`, `object`, ...\n}\n```\n","author":{"url":"https://github.com/tinganho","@type":"Person","name":"tinganho"},"datePublished":"2016-07-04T10:29:01Z","url":"https://github.com/microsoft/TypeScript/issues/9506"}
| 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:1f3a2b39-5f15-41ab-52fa-b6c346066636 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 926A:2528E1:601B03:8194C6:6B03DE55 |
| html-safe-nonce | bb6a2649477a54396e7360f433090e9f87bcbab109fe75d140c418922871ba5c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MjZBOjI1MjhFMTo2MDFCMDM6ODE5NEM2OjZCMDNERTU1IiwidmlzaXRvcl9pZCI6IjIyODIyNzA5MjQ4MTg2MDM2MDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e9295189d49eb163a89eb2868d632180f3f7b013d0e656dd64a1769feb2f068c |
| hovercard-subject-tag | issue:163648238 |
| 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/9506/issue_layout |
| twitter:image | https://opengraph.githubassets.com/34ac2942fe586326af126879fc3576b8497c17b4ad261e53848f33f91088a72d/microsoft/TypeScript/issues/9506 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/34ac2942fe586326af126879fc3576b8497c17b4ad261e53848f33f91088a72d/microsoft/TypeScript/issues/9506 |
| og:image:alt | As I understood typeof operator can only return undefined, object, boolean, number, string, symbol, function. If the RHS is a string literal, I think it should check against the above values and th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tinganho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width