Handle comments in export declarations between type and type name. (#19565)
This commit is contained in:
1 parent
62ccd0d9bf
commit
a7ce99aa57
4 files changed
+48
-3
No files matched your search
@@ -0,0 +1,15 @@
|
||||
#### Fix comments being dropped on shorthand `type` import/export specifiers (#19565 by @kirkwaiblinger)
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```tsx
|
||||
// Input
|
||||
export { type /* comment */ T } from "foo";
|
||||
import { type /* comment */ T } from "foo";
|
||||
|
||||
// Prettier stable
|
||||
Error: Comment "comment" was not printed. Please report this error!
|
||||
|
||||
// Prettier main
|
||||
export { type /* comment */ T } from "foo";
|
||||
import { type /* comment */ T } from "foo";
|
||||
```
|
||||
Reference in new issue
Block a user