Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 446 Bytes

File metadata and controls

21 lines (17 loc) · 446 Bytes

Keep trailing commas for type parameters in embedded TSX (#11685 by @sosukesuzuki)

The trailing comma is necessary to prevent TypeScript from treating the <T> as the beginning of a JSX expression.

<!-- Input  -->
```tsx
const test = <T,>(value: T) => {};
```

<!-- Prettier stable -->
```tsx
const test = <T>(value: T) => {};
```

<!-- Prettier main -->
```tsx
const test = <T,>(value: T) => {};
```