Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 699 Bytes

File metadata and controls

34 lines (27 loc) · 699 Bytes

Improve formatting for empty tuple types (#11884 by @sosukesuzuki)

// Input
type Foo =
  Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo extends []
    ? Foo3
    : Foo4;

// Prettier stable
type Foo = Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo extends [

]
  ? Foo3
  : Foo4;

// Prettier stable (tailingCommma = all)
// Invalid TypeScript code
type Foo = Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo extends [
  ,
]
  ? Foo3
  : Foo4;

// Prettier main
type Foo =
  Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo extends []
    ? Foo3
    : Foo4;