Skip to content

Commit

Permalink
Fixes the year
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Aug 31, 2021
1 parent 8a1d3c9 commit ede3cf4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -774,11 +774,11 @@ This is discussed [in some detail here](https://github.com/microsoft/TypeScript-
https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/991
### `useDefineForClassFields` now defaults to true on `es2020` and above
### `useDefineForClassFields` now defaults to true on `esnext` and eventually on `es2022`
In ES2020 the class fields feature was added into JavaScript with behavior which differed from how TypeScript had implemented it. In preparation for this, in TypeScript 3.7, a flag was added ([`useDefineForClassFields`](https://www.typescriptlang.org/tsconfig#useDefineForClassFields)) to migrate to emitted JavaScript to match the JavaScript standard behavior.
In 2021 the class fields feature was added into the JavaScript specification with behavior which differed from how TypeScript had implemented it. In preparation for this, in TypeScript 3.7, a flag was added ([`useDefineForClassFields`](https://www.typescriptlang.org/tsconfig#useDefineForClassFields)) to migrate to emitted JavaScript to match the JavaScript standard behavior.
Now that the feature is in JavaScript, we are switching to the JavaScript behavior for any projects targeting `es2020` and above.
Now that the feature is in JavaScript we are changing the default to `true` for ES2022 and above, including ESNext.
### Errors on Always-Truthy Promise Checks
Expand Down

0 comments on commit ede3cf4

Please sign in to comment.