Fix generator missing parens on Flow union types (#6334)
This commit is contained in:
10
packages/babel-generator/test/fixtures/flow/type-union-intersection/actual.js
vendored
Normal file
10
packages/babel-generator/test/fixtures/flow/type-union-intersection/actual.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
type foo = ?(a | b);
|
||||
type foo2 = ?(a & b);
|
||||
type foo3 = (a | b)[];
|
||||
type foo4 = (a & b)[];
|
||||
type foo5 = a | b | c;
|
||||
type foo6 = a & b & c;
|
||||
type foo7 = a & b | c;
|
||||
type foo8 = a | b & c;
|
||||
type foo9 = a & (b | c);
|
||||
type foo10 = (a | b) & c;
|
||||
10
packages/babel-generator/test/fixtures/flow/type-union-intersection/expected.js
vendored
Normal file
10
packages/babel-generator/test/fixtures/flow/type-union-intersection/expected.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
type foo = ?(a | b);
|
||||
type foo2 = ?(a & b);
|
||||
type foo3 = (a | b)[];
|
||||
type foo4 = (a & b)[];
|
||||
type foo5 = a | b | c;
|
||||
type foo6 = a & b & c;
|
||||
type foo7 = (a & b) | c;
|
||||
type foo8 = a | (b & c);
|
||||
type foo9 = a & (b | c);
|
||||
type foo10 = (a | b) & c;
|
||||
Reference in New Issue
Block a user