Release 2.8.6

This commit is contained in:
fisker committed 2023-03-21 16:14:26 +08:00
1 parent 44aef0b1ba
commit 10fe1ed623
6 files changed
+62 -33

No files matched your search

+29
View File
@@ -1,3 +1,32 @@
# 2.8.6
[diff](https://github.com/prettier/prettier/compare/2.8.5...2.8.6)
#### Allow decorators on private members and class expressions ([#14548](https://github.com/prettier/prettier/pull/14548) by [@fisker](https://github.com/fisker))
<!-- prettier-ignore -->
```ts
// Input
class A {
@decorator()
#privateMethod () {}
}
// Prettier 2.8.5
SyntaxError: Decorators are not valid here. (2:3)
1 | class A {
> 2 | @decorator()
| ^^^^^^^^^^^^
3 | #privateMethod () {}
4 | }
// Prettier 2.8.6
class A {
@decorator()
#privateMethod() {}
}
```
# 2.8.5
[diff](https://github.com/prettier/prettier/compare/2.8.4...2.8.5)