Skip to content

Commit

Permalink
Fix leading comments in mapped types with readonly (prettier#13427)
Browse files Browse the repository at this point in the history
  • Loading branch information
thorn0 authored and medikoo committed Feb 1, 2024
1 parent b49a92b commit 20e26e1
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions changelog_unreleased/typescript/13427.md
@@ -0,0 +1,22 @@
#### Fix leading comments in mapped types with `readonly` (#13427 by @thorn0, @sosukesuzuki)

<!-- prettier-ignore -->
```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];
};
```

0 comments on commit 20e26e1

Please sign in to comment.