Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for object type spread (#5525)
* Add support for object type spread * Type spread: remove variance and add stripping test
- Loading branch information
1 parent
14ed031
commit 8434f89
Showing
6 changed files
with
29 additions
and
0 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
7 changes: 7 additions & 0 deletions
7
packages/babel-generator/test/fixtures/flow/object-literal-types/actual.js
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,7 @@ | ||
type U = {}; | ||
type V = {}; | ||
type T = { ...U, }; | ||
type T = { ...U, ...V }; | ||
type T = { p: V, ...U }; | ||
type T = { ...U, p: V, }; | ||
type T = { ...{}|{ p: V, }}; |
7 changes: 7 additions & 0 deletions
7
packages/babel-generator/test/fixtures/flow/object-literal-types/expected.js
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,7 @@ | ||
type U = {}; | ||
type V = {}; | ||
type T = { ...U }; | ||
type T = { ...U, ...V, }; | ||
type T = { p: V, ...U, }; | ||
type T = { ...U, p: V, }; | ||
type T = { ...{} | { p: V } }; |
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
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