Visitar URL original
Fix to add parentheses for TSTypeQuery in some case by onishi-kohei · Pull Request #14042 · prettier/prettier · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix changelog
  • Loading branch information
fisker authored Dec 29, 2022
commit 15096f1f06a92293b828853b197479675faa104f
7 changes: 6 additions & 1 deletion changelog_unreleased/typescript/14042.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#### Fix to add parentheses for TSTypeQuery in some case (#13546, #14042 by @onishi-kohei)
#### Add parentheses for TSTypeQuery in some case (#14042 by @onishi-kohei)

<!-- prettier-ignore -->
```tsx
Expand All @@ -8,6 +8,11 @@ a as (typeof node.children)[]
a as ((typeof node.children)[number])[]

// Prettier stable
a as typeof node.children[number];
a as typeof node.children[];
a as typeof node.children[number][];

// Prettier main
a as (typeof node.children)[number];
a as (typeof node.children)[];
a as (typeof node.children)[number][];
Expand Down