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:
@@ -256,4 +256,4 @@
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
5
test/fixtures/flow/type-annotations/108/actual.js
vendored
Normal file
5
test/fixtures/flow/type-annotations/108/actual.js
vendored
Normal 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 };
|
||||
1774
test/fixtures/flow/type-annotations/108/expected.json
vendored
Normal file
1774
test/fixtures/flow/type-annotations/108/expected.json
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
test/fixtures/flow/type-annotations/109/actual.js
vendored
Normal file
1
test/fixtures/flow/type-annotations/109/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var a : { x: number{ y: string } } = { x: 0, y: 'foo' };
|
||||
3
test/fixtures/flow/type-annotations/109/options.json
vendored
Normal file
3
test/fixtures/flow/type-annotations/109/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "Unexpected token (1:19)"
|
||||
}
|
||||
Reference in New Issue
Block a user