swc/crates/swc_ecma_parser/tests/tsc/parserArrowFunctionExpression1.json

94 lines
2.1 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 35,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 1,
"end": 35,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 5,
"end": 34,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 5,
"end": 6,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 9,
"end": 34,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 17,
"end": 26,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 18,
"end": 26,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 20,
"end": 26,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 31,
"end": 34,
"ctxt": 0
},
"stmts": []
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
}
],
"interpreter": null
}