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

100 lines
2.0 KiB
JSON

{
"type": "Script",
"span": {
"start": 41,
"end": 90,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 56,
"end": 59,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 41,
"end": 90,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 77,
"end": 90,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 81,
"end": 88,
"ctxt": 0
},
"argument": null
}
]
},
"generator": false,
"async": true,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 61,
"end": 76,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 63,
"end": 76,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 63,
"end": 70,
"ctxt": 0
},
"value": "Promise",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 70,
"end": 76,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 71,
"end": 75,
"ctxt": 0
},
"kind": "void"
}
]
}
}
}
}
],
"interpreter": null
}