Title: Design Meeting Notes, 3/6/2020 · Issue #37388 · microsoft/TypeScript · GitHub
Open Graph Title: Design Meeting Notes, 3/6/2020 · Issue #37388 · microsoft/TypeScript
X Title: Design Meeting Notes, 3/6/2020 · Issue #37388 · microsoft/TypeScript
Description: Assignability Between {} and Unconstrained Type Parameters #33570 When we added unknown, we also added a special case for unknown to be assignable to {} and Object. A while back, we changed the default type parameter constraint of {} to ...
Open Graph Description: Assignability Between {} and Unconstrained Type Parameters #33570 When we added unknown, we also added a special case for unknown to be assignable to {} and Object. A while back, we changed the def...
X Description: Assignability Between {} and Unconstrained Type Parameters #33570 When we added unknown, we also added a special case for unknown to be assignable to {} and Object. A while back, we changed the def...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/37388
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design Meeting Notes, 3/6/2020","articleBody":"# Assignability Between `{}` and Unconstrained Type Parameters\r\n\r\nhttps://github.com/microsoft/TypeScript/pull/33570\r\n\r\n* When we added `unknown`, we also added a special case for `unknown` to be assignable to `{}` and `Object`.\r\n* A while back, we changed the default type parameter constraint of `{}` to `unknown`\r\n* This actually broke us as well!\r\n * A couple of places where we mixed and matched between `{}` and `unknown`.\r\n* Lots of failures, but mostly failures in the same package.\r\n * `schema\u003cT>` where `T` really should've been updated to `{}`.\r\n* Does this break type parameters that explicitly extend `{}`?\r\n * No, there's no special casing for type parameters.\r\n* Is it pretty easy to fix?\r\n * Pretty consistent that people just have to change the constraints to only accept `{}` or `object`.\r\n* Not such a big fan of more breaks in the same release.\r\n * But the error messages are consistent around `{}`.\r\n* What about when you're not in strict mode?\r\n * There, `unknown` and `{}` are really the same thing.\r\n * Maybe that's why we kept the rule in the first place.\r\n * `unknown` is already assignable to `{}` outside of `strictNullChecks`, so this doesn't affect users there.\r\n* Who'd it break?\r\n * DefinitelyTyped\r\n * Office UI Fabric\r\n * Seems to be from DefinitelyTyped changes\r\n* Conclusion\r\n * Try to see whether we can at least give an actionable error on this change.\r\n * Let's hold it off for another release.\r\n\r\n# Update on Intersection Assignability with Optional Properties\r\n\r\nhttps://github.com/microsoft/TypeScript/pull/37195\r\n\r\n* Office UI Fabric got hit, gave them an update.\r\n\r\n# Checking Index Signatures In the Presence of Optional Properties\r\n\r\nhttps://github.com/microsoft/TypeScript/pull/27591\r\n\r\n* https://github.com/mattmccutchen/TypeScript/pull/1/files#diff-601ae163618e1a582913605ac0b1b7c1R104-R116\r\n* https://github.com/mattmccutchen/TypeScript/pull/1/files#diff-0e62d568d28b82cee9e66b2b8fafd290R7-R42\r\n\r\n* Is debatable - doesn't mean that all the properties are there\r\n * Depends on the intent\r\n* Definitely catches bad code!\r\n * Breaks VS Code and Azure, but these are correct breaks!\r\n* Delay this for the next release.\r\n* Lets give known broken partner teams a heads up\r\n * @weswigham to tarball this\r\n * @sandersn reach out to VS Code\r\n * @DanielRosenwasser reach to Azure SDK","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2020-03-13T21:53:35Z","url":"https://github.com/microsoft/TypeScript/issues/37388"}
| 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:4445c2c8-e8a9-80c2-0ae1-2bddbdb01129 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B78A:20AA01:C115AA:F87A2E:6B00EBC0 |
| html-safe-nonce | cf4092e53fd401718842f18a4f6bdc2617f077525334eb4c0dff7ff44b9abfe5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNzhBOjIwQUEwMTpDMTE1QUE6Rjg3QTJFOjZCMDBFQkMwIiwidmlzaXRvcl9pZCI6IjM3ODU1MDg2NTM3ODQ2ODk2MDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9826745c5e085f57908f983a323b69d0f1a964df76e44e88d0b185c2e061520a |
| hovercard-subject-tag | issue:580879909 |
| 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/37388/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1f737a9f9613d30536b783f2fe091cf9aca90a45c195c33ac293cbd20a7e84c9/microsoft/TypeScript/issues/37388 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1f737a9f9613d30536b783f2fe091cf9aca90a45c195c33ac293cbd20a7e84c9/microsoft/TypeScript/issues/37388 |
| og:image:alt | Assignability Between {} and Unconstrained Type Parameters #33570 When we added unknown, we also added a special case for unknown to be assignable to {} and Object. A while back, we changed the def... |
| 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