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

90 lines
1.8 KiB
JSON

{
"type": "Script",
"span": {
"start": 40,
"end": 79,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 55,
"end": 58,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 40,
"end": 79,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 76,
"end": 79,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": true,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 60,
"end": 75,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 62,
"end": 75,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 62,
"end": 69,
"ctxt": 0
},
"value": "Promise",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 69,
"end": 75,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 70,
"end": 74,
"ctxt": 0
},
"kind": "void"
}
]
}
}
}
}
],
"interpreter": null
}