Add support for leading pipes in Flow type alias RHS syntax

This commit is contained in:
Jeff Morrison
2016-02-04 15:50:19 -05:00
parent bcc32da0d9
commit e6951e99f0
8 changed files with 497 additions and 2 deletions

View File

@@ -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)
;

View File

@@ -3,3 +3,11 @@ function a() {}
/*:: type B = {
name: string;
};*/
/*:: type union =
| {type: "A"}
| {type: "B"}
;*/
/*:: type overloads =
& ((x: string) => number)
& ((x: number) => string)
;*/