Keep comment after destructuring pattern out of the pattern (#19905)
Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
1 parent
b38222eab1
commit
11d55846a0
5 files changed
+131
-7
No files matched your search
@@ -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;
|
||||
```
|
||||
Reference in new issue
Block a user