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

236 lines
4.7 KiB
JSON

{
"type": "Module",
"span": {
"start": 43,
"end": 228,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 49,
"end": 50,
"ctxt": 0
},
"value": "x",
"optional": false
},
"declare": false,
"span": {
"start": 43,
"end": 52,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "TsExportAssignment",
"span": {
"start": 53,
"end": 64,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 62,
"end": 63,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 89,
"end": 121,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 96,
"end": 100,
"ctxt": 0
},
"value": "foo1",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 103,
"end": 120,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 111,
"end": 119,
"ctxt": 0
},
"value": "./foo1",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
{
"type": "TsExportAssignment",
"span": {
"start": 123,
"end": 147,
"ctxt": 0
},
"expression": {
"type": "ObjectExpression",
"span": {
"start": 132,
"end": 147,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 138,
"end": 139,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 141,
"end": 145,
"ctxt": 0
},
"value": "foo1",
"optional": false
}
}
]
}
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 171,
"end": 202,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 178,
"end": 182,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 185,
"end": 202,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 193,
"end": 201,
"ctxt": 0
},
"value": "./foo2",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 209,
"end": 210,
"ctxt": 0
},
"value": "x",
"optional": false
},
"declare": false,
"span": {
"start": 203,
"end": 228,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": {
"type": "MemberExpression",
"span": {
"start": 219,
"end": 225,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 219,
"end": 223,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 224,
"end": 225,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}