diff --git a/changelog_unreleased/typescript/13427.md b/changelog_unreleased/typescript/13427.md new file mode 100644 index 000000000000..96f9b91da401 --- /dev/null +++ b/changelog_unreleased/typescript/13427.md @@ -0,0 +1,22 @@ +#### Fix leading comments in mapped types with `readonly` (#13427 by @thorn0, @sosukesuzuki) + + +```tsx +// Input +type Type = { + // comment + readonly [key in Foo]; +}; + +// Prettier stable +type Type = { + readonly // comment + [key in Foo]; +}; + +// Prettier main +type Type = { + // comment + readonly [key in Foo]; +}; +```