Title: Regression on Promise Type Checking in Latest Insiders · Issue #15352 · microsoft/TypeScript · GitHub
Open Graph Title: Regression on Promise Type Checking in Latest Insiders · Issue #15352 · microsoft/TypeScript
X Title: Regression on Promise Type Checking in Latest Insiders · Issue #15352 · microsoft/TypeScript
Description: From: microsoft/vscode#25215 TypeScript Version: 2.3.1-insiders0420 Code Using es2015.lib.d.ts: function foo(x: Promise
Open Graph Description: From: microsoft/vscode#25215 TypeScript Version: 2.3.1-insiders0420 Code Using es2015.lib.d.ts: function foo(x: Promise
X Description: From: microsoft/vscode#25215 TypeScript Version: 2.3.1-insiders0420 Code Using es2015.lib.d.ts: function foo(x: Promise<boolean>) {} foo(new Promise(() => true)) Expected behavior: This co...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/15352
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Regression on Promise Type Checking in Latest Insiders","articleBody":"\u003c!-- BUGS: Please use this template. -->\r\n\u003c!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript -->\r\n\u003c!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->\r\n\r\nFrom: https://github.com/Microsoft/vscode/issues/25215\r\n\r\n**TypeScript Version:** 2.3.1-insiders0420\r\n\r\n**Code**\r\n\r\nUsing `es2015.lib.d.ts`:\r\n\r\n```ts\r\nfunction foo(x: Promise\u003cboolean>) {}\r\n\r\nfoo(new Promise(() => true))\r\n```\r\n\r\n**Expected behavior:**\r\nThis compiles fine with TS 2.2.2 and with the older insiders 2.3.1 release.\r\n\r\n**Actual behavior:**\r\nWith the current insiders, we get: `message: 'Argument of type 'Promise\u003c{}>' is not assignable to parameter of type 'Promise\u003cboolean>'.\r\n Type '{}' is not assignable to type 'boolean'.'`\r\n\r\n\r\nThis is causing upwards of 230 compiler errors in the vscode codebase\r\n\r\nPossible related to #15104","author":{"url":"https://github.com/mjbvz","@type":"Person","name":"mjbvz"},"datePublished":"2017-04-24T18:30:21Z","url":"https://github.com/microsoft/TypeScript/issues/15352"}
| 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:8bd35d9d-1642-2445-276b-ced424148efc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B9A0:19F84C:C4DF5E:FDF841:6B00EC94 |
| html-safe-nonce | 5a125f9204c086afb37e6a4a9adb0783b9866d73ecaa2ecbaa67f19ae93b2d13 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOUEwOjE5Rjg0QzpDNERGNUU6RkRGODQxOjZCMDBFQzk0IiwidmlzaXRvcl9pZCI6IjYwMjY5ODE1MDk2NDE2MTY4NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a42dec8881ac8461f7a7026278463bf699483c59260e6bde1bcbd7b3dc6a490e |
| hovercard-subject-tag | issue:223911521 |
| 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/15352/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4997f3de9cbd74a0a2d27871ecd20c584eb89543435019791c20df0ed0c69b0e/microsoft/TypeScript/issues/15352 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4997f3de9cbd74a0a2d27871ecd20c584eb89543435019791c20df0ed0c69b0e/microsoft/TypeScript/issues/15352 |
| og:image:alt | From: microsoft/vscode#25215 TypeScript Version: 2.3.1-insiders0420 Code Using es2015.lib.d.ts: function foo(x: Promise |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mjbvz |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| 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 | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width