Title: Design Meeting Notes, 8/17/2022 · Issue #50522 · microsoft/TypeScript · GitHub
Open Graph Title: Design Meeting Notes, 8/17/2022 · Issue #50522 · microsoft/TypeScript
X Title: Design Meeting Notes, 8/17/2022 · Issue #50522 · microsoft/TypeScript
Description: satisfies Proposal #47920 x satisfies T What about x as satisfies T Why? Usable in other places.
Open Graph Description: satisfies Proposal #47920 x satisfies T What about x as satisfies T Why? Usable in other places.
X Description: satisfies Proposal #47920 x satisfies T What about x as satisfies T Why? Usable in other places. <satisfies T>x in angle-bracket assertions. /** @type {satisfies T} */ in JSDoc. Angle bracket...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/50522
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design Meeting Notes, 8/17/2022","articleBody":"# `satisfies` Proposal\r\n\r\nhttps://github.com/microsoft/TypeScript/issues/47920\r\n\r\n* `x satisfies T`\r\n* What about\r\n * `x as satisfies T`\r\n * Why?\r\n * Usable in other places.\r\n * `\u003csatisfies T>x` in angle-bracket assertions.\r\n * `/** @type {satisfies T} */` in JSDoc.\r\n* Angle bracket priority?\r\n * We generally de-prioritize this feature due to JSX.\r\n * But you usually know the type *ahead* of time. The type coming first allows auto-complete to work better and signals what is coming ahead.\r\n* JSDoc?\r\n * We try not to add new tags that aren't doc'd in the usejsdoc site.\r\n * Ship has sailed with TS-specific syntax in JSDoc, right?\r\n* Seems like the stand-alone `satisfies` syntax is the cleanest and reads the best, even with all the speculative design space.\r\n\r\n# Massive Slowdown\r\n\r\nhttps://github.com/microsoft/TypeScript/issues/50290\r\n\r\n* We have an optimization whenever we have a large union.\r\n * We have an optimization where if you have very large unions, we try relating in a specific order.\r\n* Someone is using the Babel type definitions where they have a union-based type for their nodes.\r\n* `@types/babel__traverse` is a discriminated union.\r\n* `get` method was declared with a conditional type.\r\n * The true branch creates an internal intersection type in the true branch.\r\n * Converting the conditional type to a type alias allows us to use pre-computed variance calculation on the alias.\r\n* So one option is to fix the type definition in DefinitelyTyped. Dramatically better\r\n* 4.7\r\n * About 7.5 seconds with or without the Definitely Typed fix.\r\n* 4.8\r\n * About 45 seconds today.\r\n * About 6.5 seconds with Definitely Typed fix.\r\n* Also have two PRs to help with this. Doesn't have the same savings as rewriting the conditional to a size, but avoids the regression.\r\n * First - try to remove parts of an intersection.\r\n * Second - remove the relationship cap size/make it higher?\r\n * Debatable cap.\r\n * No, but really shouldn't allow 80 second check-times.\r\n* Can do all.\r\n* But bringing a change in for 4.8? Risky.\r\n * Can try to do this in 4.9, back-port if necessary.\r\n* Also, can try to cache ad-hoc conditonal wthout aliases.\r\n* Conclusions:\r\n * Make the DT test.\r\n * Removing the relationship cap? Experiment.\r\n","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2022-08-29T19:46:54Z","url":"https://github.com/microsoft/TypeScript/issues/50522"}
| 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:50e79316-151f-ee38-c976-add40b681656 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A9B0:34CAB:25F30A3:307FDB4:6B019A63 |
| html-safe-nonce | 4bcc9eec20222fc87cf0ffced882f61e7aae9356ec1ed440c0b9e3912b87f49e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOUIwOjM0Q0FCOjI1RjMwQTM6MzA3RkRCNDo2QjAxOUE2MyIsInZpc2l0b3JfaWQiOiI2MzQ0OTk0MjU5NDkzNTU4ODgzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f8da9401601acf061880416846b190e33ebba6772e50b45be70f2a93035f0f27 |
| hovercard-subject-tag | issue:1354793801 |
| 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/50522/issue_layout |
| twitter:image | https://opengraph.githubassets.com/728d76470ff79c573ad97193b208dc5fbfae4efb606f575655c85bf576ff2448/microsoft/TypeScript/issues/50522 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/728d76470ff79c573ad97193b208dc5fbfae4efb606f575655c85bf576ff2448/microsoft/TypeScript/issues/50522 |
| og:image:alt | satisfies Proposal #47920 x satisfies T What about x as satisfies T Why? Usable in other places. |
| 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 | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width