You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,35 @@
2
2
3
3
## Unreleased
4
4
5
+
* Fix lowering of define semantics for TypeScript parameter properties ([#4421](https://github.com/evanw/esbuild/issues/4421))
6
+
7
+
The previous release incorrectly generated class fields for TypeScript parameter properties even when the configured target environment does not support class fields. With this release, the generated class fields will now be correctly lowered in this case:
8
+
9
+
```ts
10
+
// Original code
11
+
classFoo {
12
+
constructor(publicx=1) {}
13
+
y =2
14
+
}
15
+
16
+
// Old output (with --loader=ts --target=es2021)
17
+
classFoo {
18
+
constructor(x=1) {
19
+
this.x=x;
20
+
__publicField(this, "y", 2);
21
+
}
22
+
x;
23
+
}
24
+
25
+
// New output (with --loader=ts --target=es2021)
26
+
classFoo {
27
+
constructor(x=1) {
28
+
__publicField(this, "x", x);
29
+
__publicField(this, "y", 2);
30
+
}
31
+
}
32
+
```
33
+
5
34
*UpdatetheGocompilerfrom1.25.7to1.26.1
6
35
7
36
Thisupgradeshouldnotaffectanything. However, therehavebeensomesignificantinternalchangestotheGocompiler, soesbuildcouldpotentiallybehavedifferentlyincertainedgecases:
0 commit comments