16 lines
478 B
Markdown
16 lines
478 B
Markdown
#### Print leading semicolon before type cast comments (#18751 by @fisker)
|
|||
|
|
|
||
|
|
<!-- prettier-ignore -->
|
||
|
|
```jsx
|
||
|
|
// Input
|
||
|
|
;/** @type {string[]} */ (['foo', 'bar']).forEach(doStuff)
|
||
|
|
|
||
|
|
// Prettier stable (--no-semi, first format)
|
||
|
|
/** @type {string[]} */ ;(["foo", "bar"]).forEach(doStuff)
|
||
|
|
|
||
|
|
// Prettier stable (--no-semi, second format)
|
||
|
|
/** @type {string[]} */ ;["foo", "bar"].forEach(doStuff)
|
||
|
|
|
||
|
|
// Prettier main (--no-semi)
|
||
|
|
;/** @type {string[]} */ (["foo", "bar"]).forEach(doStuff)
|
||
|
|
```
|