Title: Design Meeting Notes, 3/27/2020 · Issue #37897 · microsoft/TypeScript · GitHub
Open Graph Title: Design Meeting Notes, 3/27/2020 · Issue #37897 · microsoft/TypeScript
X Title: Design Meeting Notes, 3/27/2020 · Issue #37897 · microsoft/TypeScript
Description: Breaks from 3.9 3.9 introduces breaks, and we found a bunch in the community - but they look like they're purely better. bottender input parameter constrainted to a union type B = Yadda | Wakka | any; // really an alias to `any` function...
Open Graph Description: Breaks from 3.9 3.9 introduces breaks, and we found a bunch in the community - but they look like they're purely better. bottender input parameter constrainted to a union type B = Yadda | Wakka | a...
X Description: Breaks from 3.9 3.9 introduces breaks, and we found a bunch in the community - but they look like they're purely better. bottender input parameter constrainted to a union type B = Yadda | Wakka...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/37897
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design Meeting Notes, 3/27/2020","articleBody":"# Breaks from 3.9\r\n\r\n* 3.9 introduces breaks, and we found a bunch in the community - but they look like they're purely better.\r\n* bottender\r\n * input parameter constrainted to a union\r\n * ```ts\r\n type B = Yadda | Wakka | any; // really an alias to `any`\r\n\r\n function fn\u003cT extends B(x: T) {\r\n takeObj(x);\r\n }\r\n\r\n function takeObj(thing: Record\u003cstring, any>) {\r\n // ...\r\n }\r\n ```\r\n * Used to work in 3.8.3, now gets an error because `x` isn't treated as much as `any`.\r\n * Seems good.\r\n* CSSBlocks\r\n * `isAttributeArgs(x)` is a type guard.\r\n * Guarded down to discriminants that are in confict, goes down to `never`.\r\n * Definitely a bug.\r\n* xstate\r\n * We do more work to explore conditional type constraints, but now we go off the rails.\r\n * Meta: how did you know what caused this?\r\n * Only two places we report that: base constrain detection and type instantiation.\r\n * Is there any way to figure out why this occurs?\r\n * Like debugging without a debugger or println\r\n * (aside: someone pronounces \"println\" as \"print len\")\r\n* webpack\r\n * A bunch of interfaces that extend Object\r\n * Pretty unnecessary\r\n * Whatever, anyway, `config?: string` intersected with `config: number`.\r\n * Now we look at the flat properties when relating from an intersection.\r\n * Now we catch that the effective property list is useless.\r\n* Conclusion: these largely seem good.\r\n\r\n# Array Method Definition Changes\r\n\r\n* There are methods that have super duper weird behavior - `concat` and `flat` etc.\r\n* People want to improve them, but often have unpredictable consequences in existing code.\r\n* Really need to think through before accepting these changes.\r\n\r\n# `awaited` Type\r\n\r\nhttps://github.com/microsoft/TypeScript/pull/35998\r\n\r\n* Had to back changes out - but 3.7 regressions have been fixed.\r\n* Do people run into this at all?\r\n* The cure may be worse than the disease given the existing code out there.\r\n* Whenever we think of `Promise\u003cT>`, that `T` really should never be a `Promise\u003c...>`\r\n * We assume that instantiation is just replacement.\r\n* If we never want to see `Promise\u003cPromise\u003c...>>`, we have to rethink everything about our implementation.\r\n* We never intended for users to use this operators, but we did want library authors to be able to express their promises too.\r\n* The type parameter that `Promise` takes really needs to be considered special in some capacity.\r\n\r\n# `--emitExtension` and `--noImplicitExtensionName`\r\n\r\nhttps://github.com/microsoft/TypeScript/pull/35148\r\n\r\n* Is this the way we wanna do this?\r\n * One member: no\r\n * Configures Node resolution\r\n * No reasonable default for a given runtime\r\n * Works pretty well, and what we have for bundlers \"works\" because it's the common subset.\r\n * But for Node's resolution (that common subset), these things don't exist \r\n* Could imagine 2 new resolution options\r\n * Node 13 experimental/Node 14 non-experimental\r\n * Understand export maps\r\n * Browser\r\n * Root-level import maps\r\n * More in-flux than the Node stuff.\r\n * Bundlers are mixing and matching behaviors of both\r\n* A single module resolver has tradeoffs that might not always succeed.\r\n* Now you need to customize endlessly\r\n * \"But what if my bundler emits outputs whose extension reflect their inputs?\"\r\n * Can't model this.\r\n* Users want to be able to say \"I wanna run under X\" not \"give me 13 options\".\r\n* Reason we haven't implemented any of this is the flux of these new strategies.\r\n* Stuff feels too in-flux\r\n * Could have experiments to get early ideas of how these work.\r\n* Might want to also consider some support for supporting both ESM and CJS at the same time.\r\n* Conclusion: would prefer new `moduleResolution` flags, not clear we want 3 separate new ones, not clear how they should all behave.\r\n\r\n# Expanded Generic Source Intersections\r\n\r\nhttps://github.com/microsoft/TypeScript/pull/37537\r\n\r\n* Lots more breaks in the community suite\r\n* Will have to understand what exactly is improved here.","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2020-04-10T20:31:16Z","url":"https://github.com/microsoft/TypeScript/issues/37897"}
| 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:8cf3cf3b-d7ad-0bbd-edb0-d96694a2d660 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E226:311640:ADCE40:DE0BD9:6B00F71F |
| html-safe-nonce | ac458a5fb3c8bd947406b2558cf27da787a18f87d9a15c508ac6fdff8947370f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjI2OjMxMTY0MDpBRENFNDA6REUwQkQ5OjZCMDBGNzFGIiwidmlzaXRvcl9pZCI6IjQxMDEzOTI4ODU1NDEzMDQwOTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | eb8e4e1a73e53cc4390b2985edad3e7e4f1917ed71badd0ae7829b8c9484ee21 |
| hovercard-subject-tag | issue:598081391 |
| 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/37897/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f6943010a77ddf8590becebc537ad912d58dcf1d065822295134132dd8223978/microsoft/TypeScript/issues/37897 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f6943010a77ddf8590becebc537ad912d58dcf1d065822295134132dd8223978/microsoft/TypeScript/issues/37897 |
| og:image:alt | Breaks from 3.9 3.9 introduces breaks, and we found a bunch in the community - but they look like they're purely better. bottender input parameter constrainted to a union type B = Yadda | Wakka | a... |
| 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