Open so1ve opened 1 year ago
i agree very ugly yikes 😣😣😣😣😣😣😣
Just for information: I think this output has multiple different problems.
break-after-operator
looks more suitable (same problem as https://github.com/prettier/prettier/issues/15292)extends
and ?
) looks better to have parens in this caseline
after extends
in this caseThanks for your investigation ❤️
Prettier 3.2.4 Playground link
--parser typescript
--trailing-comma es5
Input:
export type Equals<X, Y> =
(<T>() => T extends X ? 1 : 2) extends
(<T>() => T extends Y ? 1 : 2)
? true
: false;
Output:
export type Equals<X, Y> =
(<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2
? true
: false;
Prettier 3.0.1 Playground link
Input:
Output:
Expected behavior:
Should be the same as the input, or something better