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

122 lines
2.9 KiB
JSON

{
"type": "Script",
"span": {
"start": 70,
"end": 115,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 70,
"end": 115,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 74,
"end": 115,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 74,
"end": 77,
"ctxt": 0
},
"value": "foo",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 80,
"end": 115,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 87,
"end": 92,
"ctxt": 0
},
"value": "await",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 112,
"end": 115,
"ctxt": 0
},
"stmts": []
},
"async": true,
"generator": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 93,
"end": 108,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 95,
"end": 108,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 95,
"end": 102,
"ctxt": 0
},
"value": "Promise",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 102,
"end": 108,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 103,
"end": 107,
"ctxt": 0
},
"kind": "void"
}
]
}
}
}
},
"definite": false
}
]
}
],
"interpreter": null
}