Title: Design Meeting Notes, 5/26/2017 · Issue #16114 · microsoft/TypeScript · GitHub
Open Graph Title: Design Meeting Notes, 5/26/2017 · Issue #16114 · microsoft/TypeScript
X Title: Design Meeting Notes, 5/26/2017 · Issue #16114 · microsoft/TypeScript
Description: Propagated Inference for Uninstantiated (Free) Type Parameters (#9366) Given #16072, we can now make more powerful inferences given contextual types on the return type of a call. However, given the following: function compose( f...
Open Graph Description: Propagated Inference for Uninstantiated (Free) Type Parameters (#9366) Given #16072, we can now make more powerful inferences given contextual types on the return type of a call. However, given the...
X Description: Propagated Inference for Uninstantiated (Free) Type Parameters (#9366) Given #16072, we can now make more powerful inferences given contextual types on the return type of a call. However, given the...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/16114
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design Meeting Notes, 5/26/2017","articleBody":"# Propagated Inference for Uninstantiated (Free) Type Parameters (#9366)\r\n\r\nGiven #16072, we can now make more powerful inferences given contextual types on the return type of a call.\r\n\r\nHowever, given the following:\r\n\r\n```ts\r\nfunction compose\u003cA, B, C>(\r\n f: (x: A) => B,\r\n g: (y: B) => C,\r\n): (x: A) => C;\r\n\r\ncompose(\r\n x => [x],\r\n y => ({ foo: x })\r\n)\r\n```\r\n\r\n* Right now we just fall back to the instantiations of `A = {}`, `B = {}`, `C = {}`.\r\n* This is unfortunate because in this scenario, there is no real constraint on the types of the parameters.\r\n * Ideally, because these are *universal* functions, the return type should still be a generic function: `\u003cA>(x: A) => { foo: A }\r\n* We've managed to get this working.\r\n* This pretty much always works well if your function arguments are *less* specific in their constraints than those of the invoked expression.\r\n * Doesn't work for certain cases when the opposite is true.\r\n* @gcnew has an implementation that can handle some of these cases.\r\n* Will investigate on a combined approach.\r\n\r\n____\r\n\r\n@mhegazy may have notes on weak types (#16047) and synthesized namespace records (#16093)","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2017-05-26T21:02:25Z","url":"https://github.com/microsoft/TypeScript/issues/16114"}
| 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:c9f1eedf-d5db-a7e1-2197-0911e3a4c22d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AAEC:3F4253:BAF39D:FA1DDA:6B00F760 |
| html-safe-nonce | cea22ac0d6ceb48a6be46cac9bdd6612bd169451d22b9ab2f8c37b433bfa9fbb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQUVDOjNGNDI1MzpCQUYzOUQ6RkExRERBOjZCMDBGNzYwIiwidmlzaXRvcl9pZCI6IjcyNDk2NzI4NzM1MDQyMDg3MzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e8d200cb7c6fb5f970ca93d290481152800fea315c572dfe4622aa88060ada0a |
| hovercard-subject-tag | issue:231734195 |
| 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/16114/issue_layout |
| twitter:image | https://opengraph.githubassets.com/560103c9dcb4839886088036498239980e098c7c66b173c3cf99e4ac72c514a8/microsoft/TypeScript/issues/16114 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/560103c9dcb4839886088036498239980e098c7c66b173c3cf99e4ac72c514a8/microsoft/TypeScript/issues/16114 |
| og:image:alt | Propagated Inference for Uninstantiated (Free) Type Parameters (#9366) Given #16072, we can now make more powerful inferences given contextual types on the return type of a call. However, given the... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DanielRosenwasser |
| 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