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

278 lines
8.4 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 122,
"end": 306,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 128,
"end": 129,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 122,
"end": 306,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 136,
"end": 304,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 136,
"end": 137,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "ArrowFunctionExpression",
"span": {
"start": 140,
"end": 303,
"ctxt": 0
},
"params": [
{
"type": "RestElement",
"span": {
"start": 147,
"end": 161,
"ctxt": 0
},
"rest": {
"start": 147,
"end": 150,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 150,
"end": 154,
"ctxt": 0
},
"value": "args",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 154,
"end": 161,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 156,
"end": 161,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 156,
"end": 159,
"ctxt": 0
},
"kind": "any"
}
}
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 166,
"end": 303,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 176,
"end": 200,
"ctxt": 0
},
"expression": {
"type": "AwaitExpression",
"span": {
"start": 176,
"end": 199,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 182,
"end": 199,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 182,
"end": 197,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 182,
"end": 189,
"ctxt": 0
},
"value": "Promise",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 190,
"end": 197,
"ctxt": 0
},
"value": "resolve",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 209,
"end": 243,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 215,
"end": 242,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 215,
"end": 218,
"ctxt": 0
},
"value": "obj",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 221,
"end": 242,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Computed",
"span": {
"start": 223,
"end": 228,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 224,
"end": 227,
"ctxt": 0
},
"value": "a",
"raw": "\"a\""
}
},
"value": {
"type": "ArrowFunctionExpression",
"span": {
"start": 230,
"end": 240,
"ctxt": 0
},
"params": [],
"body": {
"type": "ThisExpression",
"span": {
"start": 236,
"end": 240,
"ctxt": 0
}
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
]
},
"definite": false
}
]
}
]
},
"async": true,
"generator": false,
"typeParameters": null,
"returnType": null
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}