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

170 lines
4.7 KiB
JSON

{
"type": "Script",
"span": {
"start": 70,
"end": 173,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 70,
"end": 173,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 74,
"end": 173,
"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": 173,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 107,
"end": 173,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 158,
"end": 171,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 162,
"end": 170,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 162,
"end": 163,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 163,
"end": 170,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 165,
"end": 170,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 165,
"end": 170,
"ctxt": 0
},
"value": "await",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
}
]
},
"async": true,
"generator": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 88,
"end": 103,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 90,
"end": 103,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 90,
"end": 97,
"ctxt": 0
},
"value": "Promise",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 97,
"end": 103,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 98,
"end": 102,
"ctxt": 0
},
"kind": "void"
}
]
}
}
}
},
"definite": false
}
]
}
],
"interpreter": null
}