Ignore dangling comments when checking type parameter comments (#19572)

This commit is contained in:
fisker Cheung authored and GitHub committed 2026-07-09 11:34:36 +08:00
1 parent 908503e9ee
commit 3d063b57b1
4 files changed
+132 -10

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
#### Ignore comments inside mapped type when checking type parameter comments (#19572 by @fisker)
<!-- prettier-ignore -->
```tsx
// Input
foo<{
// comment
[key in keyof Foo]: number
}>();
// Prettier stable
foo<
{
// comment
[key in keyof Foo]: number;
}
>();
// Prettier main
foo<{
// comment
[key in keyof Foo]: number;
}>();
```