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

170 lines
4.7 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 44,
"end": 147,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 44,
"end": 147,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 48,
"end": 147,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 48,
"end": 51,
"ctxt": 0
},
"value": "foo",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 54,
"end": 147,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 81,
"end": 147,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 132,
"end": 145,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 136,
"end": 144,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 136,
"end": 137,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 137,
"end": 144,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 139,
"end": 144,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 139,
"end": 144,
"ctxt": 0
},
"value": "await",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
}
]
},
"async": true,
"generator": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 62,
"end": 77,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 64,
"end": 77,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 64,
"end": 71,
"ctxt": 0
},
"value": "Promise",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 71,
"end": 77,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 72,
"end": 76,
"ctxt": 0
},
"kind": "void"
}
]
}
}
}
},
"definite": false
}
]
}
],
"interpreter": null
}