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

169 lines
4.6 KiB
JSON

{
"type": "Module",
"span": {
"start": 95,
"end": 225,
"ctxt": 0
},
"body": [
{
"type": "ExportDefaultExpression",
"span": {
"start": 95,
"end": 118,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 110,
"end": 117,
"ctxt": 0
},
"value": "./foo",
"raw": "\"./foo\""
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 158,
"end": 161,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 143,
"end": 225,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 164,
"end": 225,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 170,
"end": 223,
"ctxt": 0
},
"argument": {
"type": "AwaitExpression",
"span": {
"start": 177,
"end": 222,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 183,
"end": 222,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 183,
"end": 189,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 190,
"end": 221,
"ctxt": 0
},
"object": {
"type": "ParenthesisExpression",
"span": {
"start": 190,
"end": 213,
"ctxt": 0
},
"expression": {
"type": "AwaitExpression",
"span": {
"start": 191,
"end": 212,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 197,
"end": 212,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 197,
"end": 203,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 204,
"end": 211,
"ctxt": 0
},
"value": "./foo",
"raw": "\"./foo\""
}
}
],
"typeArguments": null
}
}
},
"property": {
"type": "Identifier",
"span": {
"start": 214,
"end": 221,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
}
],
"typeArguments": null
}
}
}
]
},
"generator": false,
"async": true,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}