Title: Design Meeting Notes, 8/25/2017 · Issue #18155 · microsoft/TypeScript · GitHub
Open Graph Title: Design Meeting Notes, 8/25/2017 · Issue #18155 · microsoft/TypeScript
X Title: Design Meeting Notes, 8/25/2017 · Issue #18155 · microsoft/TypeScript
Description: Add promised type (continued) #17077 Never had a name for this. await? awaited? Positive sentiment for both. How bad is the world without this? Well stricter generic checks broke a lot of checking. But are things fixed now? We've gotten ...
Open Graph Description: Add promised type (continued) #17077 Never had a name for this. await? awaited? Positive sentiment for both. How bad is the world without this? Well stricter generic checks broke a lot of checking....
X Description: Add promised type (continued) #17077 Never had a name for this. await? awaited? Positive sentiment for both. How bad is the world without this? Well stricter generic checks broke a lot of checking....
Opengraph URL: https://github.com/microsoft/TypeScript/issues/18155
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design Meeting Notes, 8/25/2017","articleBody":"# Add `promised` type (continued)\r\n\r\nhttps://github.com/Microsoft/TypeScript/pull/17077\r\n\r\n* Never had a name for this.\r\n * `await`?\r\n * `awaited`?\r\n * Positive sentiment for both.\r\n* How bad is the world without this?\r\n * Well stricter generic checks broke a lot of checking.\r\n * But are things fixed now? We've gotten this far without it.\r\n* Would love to see specifically why we need to do this.\r\n * PR has some examples.\r\n* At the end of the last meeting we had two open issues:\r\n * Naming\r\n * Highed order relationships.\r\n* What if we just worked on some of the inference issues that `Promise`/`PromiseLike`s experience relating to union type inference?\r\n * [Follow up with @rbuckton]\r\n\r\n# String enums and indexing\r\n\r\n* Now that string-enums are a thing, people want to use them everywhere, like in\r\n * interface/literal types.\r\n * computed properties\r\n* Would need to generalize declarations constructed with literal types:\r\n\r\n ```ts\r\n const b = \"b\";\r\n const x = {\r\n [b]: 100,\r\n }\r\n\r\n // equivalent to\r\n\r\n const y = {\r\n b: 100,\r\n }\r\n ```\r\n* What would we do in the case of\r\n\r\n ```ts\r\n declare const x: \"a\" | \"b\";\r\n const a = {\r\n [x]: 100,\r\n }\r\n ```\r\n * Is that\r\n\r\n ```ts\r\n // { a: number } | { b: number }\r\n // or\r\n // { a?: number, b?: number }\r\n // or\r\n // { [x: string]: number }\r\n ```\r\n* Leaning towards last option for practicality.\r\n* What about cases where you want to quickly manufacture distinct cases?\r\n\r\n ```ts\r\n function createThing\u003cK extends \"a\" | \"b\", payload: T\u003e(kind: K, payload: T) {\r\n return {\r\n kind,\r\n payload: {\r\n [kind]: T,\r\n }\r\n };\r\n }\r\n\r\n createThing(\"a\", 100);\r\n ```\r\n * Could boil this down to @gcanti's [`Unionize`](https://github.com/Microsoft/TypeScript/issues/17930#issuecomment-323572209).\r\n * ```ts\r\n type m = { [P in \"a\" | \"b\" ]: { [Q in P]: number } }[\"a\" | \"b\"];\r\n ```\r\n * Becomes `type m = { a: number; } | { b: number; }`","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2017-08-30T18:07:36.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/18155/TypeScript/issues/18155"}
| 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:88811559-adc2-fe15-5935-f6b5951267a7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BEB6:315C2A:23BAE3C:30914DD:6A62EF75 |
| html-safe-nonce | f98f28c04c3224316b9bc6cabe88ee34d0ebe9bd9f342eee91be81787832d1fe |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRUI2OjMxNUMyQToyM0JBRTNDOjMwOTE0REQ6NkE2MkVGNzUiLCJ2aXNpdG9yX2lkIjoiMzI3MTg0NDUyODExMTQxNTE1NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 21c11faf094b65efc26d912504d9c426bd97ea195b9e2fb5cf1350637a2ad755 |
| hovercard-subject-tag | issue:254087911 |
| 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/18155/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5ffa0f69af648ce675f8371a6047df7ddc9c1de1a644b8c59699726bfd16a2a6/microsoft/TypeScript/issues/18155 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5ffa0f69af648ce675f8371a6047df7ddc9c1de1a644b8c59699726bfd16a2a6/microsoft/TypeScript/issues/18155 |
| og:image:alt | Add promised type (continued) #17077 Never had a name for this. await? awaited? Positive sentiment for both. How bad is the world without this? Well stricter generic checks broke a lot of checking.... |
| 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 | b415018e190e73858133ddcaa36acce7b3f3572fe54dda84bd3b21a6ec714c30 |
| 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 | 22f98521e99f504294ab0812b66104d50eb75a70 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width