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

500 lines
13 KiB
JSON

{
"type": "Script",
"span": {
"start": 22,
"end": 240,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 22,
"end": 118,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 29,
"end": 30,
"ctxt": 0
},
"value": "B",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 31,
"end": 118,
"ctxt": 0
},
"body": [
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 37,
"end": 57,
"ctxt": 0
},
"declare": false,
"isExport": true,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 51,
"end": 52,
"ctxt": 0
},
"value": "a",
"optional": false
},
"moduleRef": {
"type": "Identifier",
"span": {
"start": 55,
"end": 56,
"ctxt": 0
},
"value": "A",
"optional": false
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 62,
"end": 116,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 75,
"end": 76,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"span": {
"start": 69,
"end": 116,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 99,
"end": 110,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 99,
"end": 101,
"ctxt": 0
},
"value": "id",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 101,
"end": 109,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 103,
"end": 109,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "MemberExpression",
"span": {
"start": 85,
"end": 88,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 85,
"end": 86,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 87,
"end": 88,
"ctxt": 0
},
"value": "C",
"optional": false
}
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 120,
"end": 193,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 127,
"end": 128,
"ctxt": 0
},
"value": "A",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 129,
"end": 193,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 135,
"end": 166,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 148,
"end": 149,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 142,
"end": 166,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 152,
"end": 164,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 152,
"end": 156,
"ctxt": 0
},
"value": "name",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 156,
"end": 164,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 158,
"end": 164,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 171,
"end": 191,
"ctxt": 0
},
"declare": false,
"isExport": true,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 185,
"end": 186,
"ctxt": 0
},
"value": "b",
"optional": false
},
"moduleRef": {
"type": "Identifier",
"span": {
"start": 189,
"end": 190,
"ctxt": 0
},
"value": "B",
"optional": false
}
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 195,
"end": 219,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 199,
"end": 218,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 199,
"end": 200,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 200,
"end": 218,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 202,
"end": 218,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 204,
"end": 216,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 204,
"end": 208,
"ctxt": 0
},
"value": "name",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 208,
"end": 216,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 210,
"end": 216,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 220,
"end": 240,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 224,
"end": 239,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 224,
"end": 225,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 228,
"end": 239,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 232,
"end": 237,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 232,
"end": 235,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 232,
"end": 233,
"ctxt": 0
},
"value": "B",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 234,
"end": 235,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 236,
"end": 237,
"ctxt": 0
},
"value": "C",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
}
],
"interpreter": null
}