Title: And expression inferrs wrong type. · Issue #26468 · microsoft/TypeScript · GitHub
Open Graph Title: And expression inferrs wrong type. · Issue #26468 · microsoft/TypeScript
X Title: And expression inferrs wrong type. · Issue #26468 · microsoft/TypeScript
Description: TypeScript Version: 3.1.0-dev.201xxxxx Search Terms: Code let b: boolean; let s: string; let x = b && s; Expected behavior: The inferred type of x is boolean | string; Actual behavior: The inferred type of x is string; Playground Link: h...
Open Graph Description: TypeScript Version: 3.1.0-dev.201xxxxx Search Terms: Code let b: boolean; let s: string; let x = b && s; Expected behavior: The inferred type of x is boolean | string; Actual behavior: The inferred...
X Description: TypeScript Version: 3.1.0-dev.201xxxxx Search Terms: Code let b: boolean; let s: string; let x = b && s; Expected behavior: The inferred type of x is boolean | string; Actual behavior: The ...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/26468
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"And expression inferrs wrong type.","articleBody":"\u003c!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨\r\n\r\nHalf of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common \"Bugs\" That Aren't Bugs section!\r\n\r\nPlease help us by doing the following steps before logging an issue:\r\n * Search: https://github.com/Microsoft/TypeScript/search?type=Issues\r\n * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ\r\n\r\nPlease fill in the *entire* template below.\r\n-->\r\n\r\n\u003c!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:** 3.1.0-dev.201xxxxx\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:**\r\n\r\n**Code**\r\n\r\n```ts\r\nlet b: boolean;\r\nlet s: string;\r\n\r\nlet x = b && s;\r\n```\r\n\r\n**Expected behavior:**\r\n\r\nThe inferred type of x is boolean | string;\r\n\r\n**Actual behavior:**\r\n\r\nThe inferred type of x is string;\r\n\r\n**Playground Link:** \u003c!-- A link to a TypeScript Playground \"Share\" link which demonstrates this behavior -->\r\n\r\nhttps://www.typescriptlang.org/play/#src=let%20b%3A%20boolean%3B%0D%0Alet%20s%3A%20string%3B%0D%0A%0D%0Alet%20x%20%3D%20b%20%26%26%20s%3B\r\n\r\n**Related Issues:** \u003c!-- Did you find other bugs that looked similar? -->\r\n","author":{"url":"https://github.com/dbaeumer","@type":"Person","name":"dbaeumer"},"datePublished":"2018-08-15T09:07:49Z","url":"https://github.com/microsoft/TypeScript/issues/26468"}
| 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:af68dd33-94db-7fc5-a6d0-86a3d30c578b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8848:19F84C:3B49999:4B5754C:6B01ED57 |
| html-safe-nonce | 5c9fbfcb920bec1972a424781d126883352391801601d697968d6735c6ed21ef |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODQ4OjE5Rjg0QzozQjQ5OTk5OjRCNTc1NEM6NkIwMUVENTciLCJ2aXNpdG9yX2lkIjoiMjI2MTcwMjU4ODQzMDkzNzQzMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1a787910e5c04762582fc93cf90db497f7e78e6aeb249c57992e7834b1b790bc |
| hovercard-subject-tag | issue:350738242 |
| 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/26468/issue_layout |
| twitter:image | https://opengraph.githubassets.com/eac994c65ce9a8c184c5e70e9ed1056deedf9ebb676ade7e80f3a07279fe87d0/microsoft/TypeScript/issues/26468 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/eac994c65ce9a8c184c5e70e9ed1056deedf9ebb676ade7e80f3a07279fe87d0/microsoft/TypeScript/issues/26468 |
| og:image:alt | TypeScript Version: 3.1.0-dev.201xxxxx Search Terms: Code let b: boolean; let s: string; let x = b && s; Expected behavior: The inferred type of x is boolean | string; Actual behavior: The inferred... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dbaeumer |
| 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:
Viewport: width=device-width