Back to Prettier

18801

changelog_unreleased/flow/18801.md

3.9.0322 B
Original Source

Add parentheses support for keyof type operator (#18801 by @marcoww6)

<!-- prettier-ignore -->
flow
// Input
type T1 = (keyof Foo)[];
type T2 = (keyof Foo)["bar"];

// Prettier stable
type T1 = keyof Foo[];
type T2 = keyof Foo["bar"];

// Prettier main
type T1 = (keyof Foo)[];
type T2 = (keyof Foo)["bar"];