swc/crates/swc_ecma_parser/tests/tsc/defaultExportInAwaitExpression01.json
2022-03-22 07:54:08 +00:00

314 lines
8.4 KiB
JSON

{
"type": "Module",
"span": {
"start": 51,
"end": 233,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 51,
"end": 118,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 57,
"end": 117,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 57,
"end": 58,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 61,
"end": 117,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 65,
"end": 72,
"ctxt": 0
},
"value": "Promise",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 74,
"end": 115,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 76,
"end": 83,
"ctxt": 0
},
"value": "resolve",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 85,
"end": 91,
"ctxt": 0
},
"value": "reject",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 97,
"end": 115,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 99,
"end": 113,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 99,
"end": 112,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 99,
"end": 106,
"ctxt": 0
},
"value": "resolve",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ObjectExpression",
"span": {
"start": 108,
"end": 110,
"ctxt": 0
},
"properties": []
}
}
],
"typeArguments": null
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExportDefaultExpression",
"span": {
"start": 119,
"end": 136,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 134,
"end": 135,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 157,
"end": 177,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 164,
"end": 165,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 164,
"end": 165,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 171,
"end": 176,
"ctxt": 0
},
"value": "./a",
"raw": "'./a'"
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 179,
"end": 233,
"ctxt": 0
},
"expression": {
"type": "ParenthesisExpression",
"span": {
"start": 179,
"end": 232,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 181,
"end": 230,
"ctxt": 0
},
"callee": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 181,
"end": 228,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 198,
"end": 228,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 204,
"end": 226,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 210,
"end": 225,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 210,
"end": 215,
"ctxt": 0
},
"value": "value",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AwaitExpression",
"span": {
"start": 218,
"end": 225,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 224,
"end": 225,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"definite": false
}
]
}
]
},
"generator": false,
"async": true,
"typeParameters": null,
"returnType": null
},
"arguments": [],
"typeArguments": null
}
}
}
],
"interpreter": null
}