Fix and tests

This commit is contained in:
Julian Viereck
2016-01-31 01:22:31 +01:00
parent 97fd9d65e7
commit a121d1b7b5
5 changed files with 210 additions and 3 deletions

View File

@@ -0,0 +1 @@
( props: SomeType, ) : ReturnType => ( 3 );

View File

@@ -0,0 +1,202 @@
{
"type": "File",
"start": 0,
"end": 43,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 43
}
},
"program": {
"type": "Program",
"start": 0,
"end": 43,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 43
}
},
"sourceType": "module",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 43,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 43
}
},
"expression": {
"type": "ArrowFunctionExpression",
"start": 0,
"end": 42,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 42
}
},
"id": null,
"generator": false,
"expression": true,
"async": false,
"params": [
{
"type": "Identifier",
"start": 2,
"end": 7,
"loc": {
"start": {
"line": 1,
"column": 2
},
"end": {
"line": 1,
"column": 7
}
},
"name": "props",
"typeAnnotation": {
"type": "TypeAnnotation",
"start": 7,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 17
}
},
"typeAnnotation": {
"type": "GenericTypeAnnotation",
"start": 9,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 17
}
},
"typeParameters": null,
"id": {
"type": "Identifier",
"start": 9,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 17
}
},
"name": "SomeType"
}
}
}
}
],
"body": {
"type": "NumericLiteral",
"start": 39,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 39
},
"end": {
"line": 1,
"column": 40
}
},
"extra": {
"rawValue": 3,
"raw": "3",
"parenthesized": true,
"parenStart": 37
},
"value": 3
},
"returnType": {
"type": "TypeAnnotation",
"start": 21,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 21
},
"end": {
"line": 1,
"column": 33
}
},
"typeAnnotation": {
"type": "GenericTypeAnnotation",
"start": 23,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 33
}
},
"typeParameters": null,
"id": {
"type": "Identifier",
"start": 23,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 33
}
},
"name": "ReturnType"
}
}
}
}
}
],
"directives": []
}
}

View File

@@ -0,0 +1,4 @@
{
"sourceType": "module",
"plugins": ["jsx", "flow", "asyncFunctions", "trailingFunctionCommas"]
}