Keep comment after destructuring pattern out of the pattern (#19905)

Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
Lazizbek Ergashevandfisker authored and GitHub committed 2026-08-23 10:48:09 +08:00
1 parent b38222eab1
commit 11d55846a0
5 files changed
+131 -7

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
#### Keep comment after destructuring pattern out of the pattern (#19905 by @lazerg)
<!-- prettier-ignore -->
```tsx
// Input
const {
foo
} /* comment */
: Foo = bar;
// Prettier stable
const { foo /* comment */ }: Foo = bar;
// Prettier main
const { foo } /* comment */ : Foo = bar;
```