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

477 lines
11 KiB
JSON

{
"type": "Module",
"span": {
"start": 39,
"end": 347,
"ctxt": 0
},
"body": [
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 39,
"end": 72,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 46,
"end": 50,
"ctxt": 0
},
"value": "foo1",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 53,
"end": 71,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 61,
"end": 70,
"ctxt": 0
},
"value": "./foo_1",
"raw": "'./foo_1'"
}
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 73,
"end": 111,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 80,
"end": 83,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 84,
"end": 111,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 87,
"end": 109,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 94,
"end": 109,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 98,
"end": 108,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 98,
"end": 99,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 102,
"end": 108,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 102,
"end": 106,
"ctxt": 0
},
"value": "foo1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 107,
"end": 108,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"definite": false
}
]
}
}
]
}
},
{
"type": "TsExportAssignment",
"span": {
"start": 112,
"end": 125,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 121,
"end": 124,
"ctxt": 0
},
"value": "Foo",
"optional": false
}
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 150,
"end": 183,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 157,
"end": 161,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 164,
"end": 182,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 172,
"end": 181,
"ctxt": 0
},
"value": "./foo_2",
"raw": "\"./foo_2\""
}
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 184,
"end": 222,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 191,
"end": 194,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 195,
"end": 222,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 198,
"end": 220,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 205,
"end": 220,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 209,
"end": 219,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 209,
"end": 210,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 213,
"end": 219,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 213,
"end": 217,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 218,
"end": 219,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"definite": false
}
]
}
}
]
}
},
{
"type": "TsExportAssignment",
"span": {
"start": 223,
"end": 236,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 232,
"end": 235,
"ctxt": 0
},
"value": "Foo",
"optional": false
}
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 261,
"end": 294,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 268,
"end": 272,
"ctxt": 0
},
"value": "foo0",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 275,
"end": 293,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 283,
"end": 292,
"ctxt": 0
},
"value": "./foo_0",
"raw": "\"./foo_0\""
}
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 295,
"end": 333,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 302,
"end": 305,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 306,
"end": 333,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 309,
"end": 331,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 316,
"end": 331,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 320,
"end": 330,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 320,
"end": 321,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 324,
"end": 330,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 324,
"end": 328,
"ctxt": 0
},
"value": "foo0",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 329,
"end": 330,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"definite": false
}
]
}
}
]
}
},
{
"type": "TsExportAssignment",
"span": {
"start": 334,
"end": 347,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 343,
"end": 346,
"ctxt": 0
},
"value": "Foo",
"optional": false
}
}
],
"interpreter": null
}