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

182 lines
3.9 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 44,
"end": 142,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 44,
"end": 62,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 51,
"end": 62,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 55,
"end": 61,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 55,
"end": 56,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 59,
"end": 61,
"ctxt": 0
},
"value": 42.0
},
"definite": false
}
]
}
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 87,
"end": 122,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 94,
"end": 97,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 100,
"end": 121,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 108,
"end": 120,
"ctxt": 0
},
"value": "./test/foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 123,
"end": 142,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 127,
"end": 141,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 127,
"end": 128,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 131,
"end": 141,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "MemberExpression",
"span": {
"start": 131,
"end": 136,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 131,
"end": 134,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 135,
"end": 136,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 139,
"end": 141,
"ctxt": 0
},
"value": 10.0
}
},
"definite": false
}
]
}
],
"interpreter": null
}