Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flow: add support for inexact tuple types (#16271)
- Loading branch information
Showing
4 changed files
with
64 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#### Support Flow's inexact tuple types (#16271 by @gkz) | ||
|
||
Adds support for Flow's inexact tuple types. | ||
|
||
<!-- prettier-ignore --> | ||
```jsx | ||
// Input | ||
type T = [number, ...]; | ||
|
||
// Prettier stable | ||
type T = [number]; | ||
|
||
// Prettier main | ||
type T = [number, ...]; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
tests/format/flow/tuples/__snapshots__/format.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
type Empty = [...]; | ||
|
||
type One = [number, ...]; |