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

137 lines
2.9 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 81,
"end": 164,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 81,
"end": 120,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 97,
"end": 100,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 88,
"end": 120,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 103,
"end": 120,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 105,
"end": 118,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 112,
"end": 117,
"ctxt": 0
},
"value": "foo",
"raw": "\"foo\""
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 141,
"end": 164,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 145,
"end": 163,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 145,
"end": 147,
"ctxt": 0
},
"value": "p1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 150,
"end": 163,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 150,
"end": 156,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 157,
"end": 162,
"ctxt": 0
},
"value": "./0",
"raw": "\"./0\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
],
"interpreter": null
}