swc/crates/swc_ecma_parser/tests/tsc/usePromiseFinally.json
2022-02-04 17:08:38 +09:00

189 lines
5.4 KiB
JSON

{
"type": "Script",
"span": {
"start": 37,
"end": 134,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 37,
"end": 134,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 41,
"end": 133,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 41,
"end": 49,
"ctxt": 0
},
"value": "promise1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 52,
"end": 133,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 52,
"end": 118,
"ctxt": 0
},
"object": {
"type": "NewExpression",
"span": {
"start": 52,
"end": 93,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 56,
"end": 63,
"ctxt": 0
},
"value": "Promise",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "FunctionExpression",
"identifier": null,
"params": [
{
"type": "Parameter",
"span": {
"start": 73,
"end": 80,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 73,
"end": 80,
"ctxt": 0
},
"value": "resolve",
"optional": false,
"typeAnnotation": null
}
},
{
"type": "Parameter",
"span": {
"start": 82,
"end": 88,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 82,
"end": 88,
"ctxt": 0
},
"value": "reject",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 64,
"end": 92,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 90,
"end": 92,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
],
"typeArguments": null
},
"property": {
"type": "Identifier",
"span": {
"start": 111,
"end": 118,
"ctxt": 0
},
"value": "finally",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 119,
"end": 132,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 130,
"end": 132,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
],
"interpreter": null
}