exact object type annotations for Flow plugin (#104)

* exact object type annotations for Flow plugin

* Couple tweaks per suggestions

* s/==/===/

* add test for unexpected token in flowObjectType Semicolon
This commit is contained in:
Basil Hosmer
2016-09-13 07:07:23 -07:00
committed by Henry Zhu
parent 015035cd27
commit ddbda7dd04
8 changed files with 1820 additions and 9 deletions

View File

@@ -256,4 +256,4 @@
],
"directives": []
}
}
}

View File

@@ -0,0 +1,5 @@
var a : {| x: number, y: string |} = { x: 0, y: 'foo' };
var b : {| x: number, y: string, |} = { x: 0, y: 'foo' };
var c : {| |} = {};
var d : { a: {| x: number, y: string |}, b: boolean } = { a: { x: 0, y: 'foo' }, b: false };
var e : {| a: { x: number, y: string }, b: boolean |} = { a: { x: 0, y: 'foo' }, b: false };

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
var a : { x: number{ y: string } } = { x: 0, y: 'foo' };

View File

@@ -0,0 +1,3 @@
{
"throws": "Unexpected token (1:19)"
}