Title: Breaking change to default useDefineForClassFields to true should be clearly documented · Issue #45653 · microsoft/TypeScript · GitHub
Open Graph Title: Breaking change to default useDefineForClassFields to true should be clearly documented · Issue #45653 · microsoft/TypeScript
X Title: Breaking change to default useDefineForClassFields to true should be clearly documented · Issue #45653 · microsoft/TypeScript
Description: Bug Report In some contexts (I'm not sure exactly which, but "target": "esnext" does it) useDefineForClassFields now defaults to true. This is a breaking change for any code with "experimentalDecorators": true, but I can't find documenta...
Open Graph Description: Bug Report In some contexts (I'm not sure exactly which, but "target": "esnext" does it) useDefineForClassFields now defaults to true. This is a breaking change for any code with "experimentalDecor...
X Description: Bug Report In some contexts (I'm not sure exactly which, but "target": "esnext" does it) useDefineForClassFields now defaults to true. This is a breaking change for any code...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/45653
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Breaking change to default useDefineForClassFields to true should be clearly documented","articleBody":"# Bug Report\r\n\r\nIn some contexts (I'm not sure exactly which, but `\"target\": \"esnext\"` does it) `useDefineForClassFields` now defaults to `true`.\r\n\r\nThis is a breaking change for any code with `\"experimentalDecorators\": true`, but I can't find documentation for it anywhere.\r\n\r\n### 🔎 Search Terms\r\n\r\n`useDefineForClassFields` `experimentalDecorators`\r\n\r\n### 🕗 Version & Regression Information\r\n\r\nThe `useDefineForClassFields` flag was introduced in 3.7 but defaulted to `false`: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#the-usedefineforclassfields-flag-and-the-declare-property-modifier\r\n\r\nThis is a known breaking change when using decorators: https://github.com/microsoft/TypeScript/issues/35081\r\n\r\nIn https://github.com/microsoft/TypeScript/pull/42663 this was changed so that in some contexts `useDefineForClassFields` now defaults to `true`.\r\n\r\nThere is no mention of `useDefineForClassFields` on https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-4.html (or 4.3, or 4.2, or 4.1)\r\n\r\nThere is a mention on 4.0, but in as different context and the default change isn't mentioned https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#properties-overriding-accessors-and-vice-versa-is-an-error\r\n\r\nThis is a breaking change for all projects that use decorators, it should be clearly identified as a breaking change.\r\n\r\n### ⏯ Playground Link\r\n\r\nThis is missing documentation\r\n\r\n### 💻 Code\r\n\r\nThis is missing documentation\r\n\r\n### 🙁 Actual behavior\r\n\r\nRelease notes don't mention the breaking change. I'm not even sure which release they should be in.\r\n\r\n### 🙂 Expected behavior\r\n\r\nRelease notes should clearly document the breaking change.\r\n","author":{"url":"https://github.com/KeithHenry","@type":"Person","name":"KeithHenry"},"datePublished":"2021-08-31T07:44:39Z","url":"https://github.com/microsoft/TypeScript/issues/45653"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| 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:bd31f73c-11a8-ad98-0624-37ef9366b468 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C6E8:22730:2807AC:36A59B:6AED48A2 |
| html-safe-nonce | e46f14a5be2d6e5682a12ef72d2e06c52f19e52935ca5b69231774f16cfad17f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNkU4OjIyNzMwOjI4MDdBQzozNkE1OUI6NkFFRDQ4QTIiLCJ2aXNpdG9yX2lkIjoiODI3MzI2NDI1ODQ2ODEwNDM1NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9090f27b908079408138abbbc05f13568aa0007e12070aaec486e77c5e23f783 |
| hovercard-subject-tag | issue:983549392 |
| 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/45653/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d8e99a7be207727ab47268cea87c534eaa43ea75d35b7baeddaf42f03f55307b/microsoft/TypeScript/issues/45653 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d8e99a7be207727ab47268cea87c534eaa43ea75d35b7baeddaf42f03f55307b/microsoft/TypeScript/issues/45653 |
| og:image:alt | Bug Report In some contexts (I'm not sure exactly which, but "target": "esnext" does it) useDefineForClassFields now defaults to true. This is a breaking change for any code with "experimentalDecor... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | KeithHenry |
| hostname | github.com |
| expected-hostname | github.com |
| None | 56fb42677ae87ed3e64410323d67980aa65d0485568a7858f874e7edfc6d1c11 |
| 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 | 9c9a37e2423ed382cf39f70b5aa4b4858b40a3b0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width