Title: Google feedback on TS 5.6-beta · Issue #59733 · microsoft/TypeScript · GitHub
Open Graph Title: Google feedback on TS 5.6-beta · Issue #59733 · microsoft/TypeScript
X Title: Google feedback on TS 5.6-beta · Issue #59733 · microsoft/TypeScript
Description: Acknowledgement I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion. Comment This GitHub issue contains feedback on the TS 5.6-beta release from the team that is responsi...
Open Graph Description: Acknowledgement I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion. Comment This GitHub issue contains feedback on the TS 5.6-bet...
X Description: Acknowledgement I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion. Comment This GitHub issue contains feedback on the TS 5.6...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/59733
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Google feedback on TS 5.6-beta","articleBody":"### Acknowledgement\n\n- [x] I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.\n\n### Comment\n\n\r\nThis GitHub issue contains feedback on the TS 5.6-beta release from the team that is responsible for keeping Google's internal software working with the latest version of TypeScript.\r\n\r\n## Executive summary\r\n\r\n* We do not expect to have significant difficulty in upgrading Google to TS 5.6.\r\n* Some changes to our TypeScript code are required to make it compile with TS 5.6.\r\n* We observed regressions in relation to generic type inference (https://github.com/microsoft/TypeScript/issues/59656)\r\n* Detail sections below explain the changes to our code we expect to make to unblock the upgrade.\r\n\r\n## Impact summary\r\n\r\nChange description | Announced | Libraries affected\r\n---------------------------------------------- | --------: | -----------------:\r\nDisallowed Nullish and Truthy Checks | Yes | 0.070%\r\nlib.d.ts Changes | Yes | 0.004%\r\nCorrect override Checks on Computed Properties | Yes | 0.004%\r\nCo- vs. contra-variant inference improvements | No | 0.004%\r\n\r\nThe **Announced** column indicates whether we were able to connect the observed change with a section in the [TS5.6-beta announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-6-beta/).\r\n\r\nThe following sections give more detailed explanations of the changes listed above.\r\n\r\n## Announced Changes\r\n\r\nThis section reviews all announced changes from the [TS5.6-beta announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-6-beta/), whether we support these changes at Google, how we will resolve pre-existing issues for these changes (if applicable), and other thoughts.\r\n\r\n### Disallowed Nullish and Truthy Checks\r\n\r\nWe support this change. The check uncovers real unintentional runtime behavior.\r\n\r\nAs part of this migration, we will add `// @ts-ignore` suppressions to silence pre-existing errors with a note advising code authors to revisit the code and fix these genuine problems.\r\n\r\nIncludes the following errors: TS2869, TS2870, TS2871, TS2872, TS2873\r\n\r\n### Iterator Helper Methods\r\n\r\nWe support this change.\r\n\r\nAs these are new, none of our codebase in TS utilizes these so nothing was impacted.\r\n\r\nHowever, the wide number of new unique iterators added is somewhat disruptive for our TS to JS interoperability infrastructure but we have a fairly simple workaround for now (e.g. `ArrayIterator`, `MapIterator`, `SetIterator`, `StringIterator` etc).\r\n\r\n### Strict Builtin Iterator Checks (and --strictBuiltinIteratorReturn)\r\n\r\nWe support this change. We typically interact with `Iterator` types via methods like `[...it]`, `Array.from(it)`, and `for (const val of it) {}` so this change is less interesting to us.\r\n\r\nWe did notice some new compiler errors in our copy of the vscode code base but I can see they have been resolved already so we'll update: https://github.com/microsoft/vscode/pull/222009\r\n\r\n### Support for Arbitrary Module Identifiers\r\n\r\nPresently, we do not plan on utilizing this feature in Google. We support TypeScript adding support for this though.\r\n\r\nThe changes to the TSC API broke a handful of code locations utilizing the TypeScript API that expected an identifier but now have to support string literals. That is, for the code that assumes `propertyName` in `ImportSpecifier` and `ExportSpecifier` is an `Identifier` will need to be updated to account for `ModuleExportName` which also accepts a `StringLiteral`. For now, we will resolve these instances by either throwing an exception for string literal values or emitting a diagnostic (where possible).\r\n\r\n### The `--noUncheckedSideEffectImports` Option\r\n\r\nWe support this change.\r\n\r\nNote: We already enforced this in our build infrastructure. The error simply shows up earlier now in the stack.\r\n\r\n### The `--noCheck` Option\r\n\r\nWe support this change.\r\n\r\nNote: This seems useful for incremental development scenarios where we want our edit-refresh cycle to be as short as possible.\r\n\r\n### Allow `--build` with Intermediate Errors\r\n\r\nWe support this change.\r\n\r\nNote: We do not utilize the `--build` flag.\r\n\r\n### Region-Prioritized Diagnostics in Editors\r\n\r\nWe support this change.\r\n\r\nNote: Editor-specific changes don't impact us.\r\n\r\n### Search Ancestor Configuration Files for Project Ownership\r\n\r\nWe support this change.\r\n\r\nNote: Editor-specific changes don't impact us though.\r\n\r\n### lib.d.ts Changes\r\n\r\nWe support this change.\r\n\r\nThe changes here were pretty sweeping and sometimes at odds with other typings we already had in the codebase.\r\n\r\nAs part of this migration, we will add `// @ts-ignore` suppressions to silence pre-existing errors with a note advising code authors to update the code.\r\n\r\nIt should be noted that there is a lot of noise in the `lib.dom.d.ts` updates including many dropped MDN comments as well as new ones added. The general order and structure of some types changed as well. This makes is somewhat difficult to identify the meaningful changes.\r\n\r\nIn addition, it would be helpful for the `lib.dom.d.ts` file to be directly checked into github so that updates are viewable in the repo itself to detect unwanted diffs. At the moment, this file appears to be generated as part of the TSC release process and so its changes are harder to detect.\r\n\r\n### .tsbuildinfo is Always Written\r\n\r\nWe support this change.\r\n\r\nNote: We do not utilize the `--build` flag.\r\n\r\n### Respecting File Extensions and package.json from within node_modules\r\n\r\nWe support this change.\r\n\r\nNote: We presently don't use `.mts` nor `.cts` file extensions though it's probable that we will support these as we start relying on Open Source projects that use them.\r\n\r\n### Correct override Checks on Computed Properties\r\n\r\nWe support this change.\r\n\r\nThis change identified a number of code patterns in our codebase that needed override.\r\n\r\nWe will resolve these by adding the missing overrides.\r\n\r\n## Unannounced Changes\r\n\r\n### Improved logic to chooses co- vs. contra-variant inference\r\n\r\nWe support this change (provided that observed regressions are resolved).\r\n\r\nhttps://github.com/microsoft/TypeScript/pull/57909 introduced improvements to the compiler that fixes two issues.\r\n\r\nWe observed several new types of inference issues in our codebase that appear to have stemmed from this.\r\n\r\nhttps://github.com/microsoft/TypeScript/issues/59656 captures one issue where I was able to make a reproduction.\r\n\r\nAnother class of issues surrounds some of our test infrastructure that uses generics to render templates. We've observed typing errors when passing in object literals containing parameters for the templates. These include optional parameters disappearing or becoming required in the parameter object bag type.\r\n\r\nWe're hoping that https://github.com/microsoft/TypeScript/pull/59709 resolves both of these classes of issues.\r\n\r\nOnce that is submitted, we will rebuild the failing targets and report back if the issue persists (hopefully with a simplified reproduction for the second issue).","author":{"url":"https://github.com/trevorade","@type":"Person","name":"trevorade"},"datePublished":"2024-08-23T20:06:40.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/59733/TypeScript/issues/59733"}
| 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:1004a199-67a6-f2a1-9390-8d859a037250 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8070:3D075F:17FC32:20261C:6A612F4A |
| html-safe-nonce | 4712e5c2f5aab9a400675f330055587cc552e09fa06db9a14d6c6230e0e636f0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDcwOjNEMDc1RjoxN0ZDMzI6MjAyNjFDOjZBNjEyRjRBIiwidmlzaXRvcl9pZCI6IjY3MjI5NTExMzY3MTc5MDk4MzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3c21cd258dc351245c7329e904dde9aabd0f5d0e814e30662e0f6b6b287d9cff |
| hovercard-subject-tag | issue:2483814068 |
| 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/59733/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f27d8456ff46f53dc9c78d6e56116b96674a16a30fd297d798440bdb4a1050ba/microsoft/TypeScript/issues/59733 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f27d8456ff46f53dc9c78d6e56116b96674a16a30fd297d798440bdb4a1050ba/microsoft/TypeScript/issues/59733 |
| og:image:alt | Acknowledgement I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion. Comment This GitHub issue contains feedback on the TS 5.6-bet... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | trevorade |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6896275b704df9b9258326d49c8695aecd98d736cd9eeda7bcbb1790ac97d3ad |
| 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 | af89f6cd55841b57fa09b6b0ed9e3f8f2e94b05d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width