Add support for leading pipes in Flow type alias RHS syntax
This commit is contained in:
@@ -3,3 +3,13 @@ type A = number;
|
||||
type B = {
|
||||
name: string;
|
||||
};
|
||||
|
||||
type union =
|
||||
| {type: "A"}
|
||||
| {type: "B"}
|
||||
;
|
||||
|
||||
type overloads =
|
||||
& ((x: string) => number)
|
||||
& ((x: number) => string)
|
||||
;
|
||||
|
||||
@@ -3,3 +3,11 @@ function a() {}
|
||||
/*:: type B = {
|
||||
name: string;
|
||||
};*/
|
||||
/*:: type union =
|
||||
| {type: "A"}
|
||||
| {type: "B"}
|
||||
;*/
|
||||
/*:: type overloads =
|
||||
& ((x: string) => number)
|
||||
& ((x: number) => string)
|
||||
;*/
|
||||
|
||||
Reference in New Issue
Block a user