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

90 lines
1.8 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 69,
"end": 110,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 84,
"end": 89,
"ctxt": 0
},
"value": "await",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 69,
"end": 110,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 107,
"end": 110,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": true,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 91,
"end": 106,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 93,
"end": 106,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 93,
"end": 100,
"ctxt": 0
},
"value": "Promise",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 100,
"end": 106,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 101,
"end": 105,
"ctxt": 0
},
"kind": "void"
}
]
}
}
}
}
],
"interpreter": null
}