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

360 lines
7.8 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 55,
"end": 420,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 55,
"end": 133,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 70,
"end": 73,
"ctxt": 0
},
"value": "JSX",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 74,
"end": 133,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 77,
"end": 98,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 87,
"end": 94,
"ctxt": 0
},
"value": "Element",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 95,
"end": 98,
"ctxt": 0
},
"body": []
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 100,
"end": 131,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 110,
"end": 127,
"ctxt": 0
},
"value": "IntrinsicElements",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 128,
"end": 131,
"ctxt": 0
},
"body": []
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 135,
"end": 188,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "StringLiteral",
"span": {
"start": 150,
"end": 161,
"ctxt": 0
},
"value": "elements1",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 162,
"end": 188,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 171,
"end": 180,
"ctxt": 0
},
"value": "MyElement",
"optional": false
},
"declare": false,
"span": {
"start": 165,
"end": 186,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 190,
"end": 243,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "StringLiteral",
"span": {
"start": 205,
"end": 216,
"ctxt": 0
},
"value": "elements2",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 217,
"end": 243,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 226,
"end": 235,
"ctxt": 0
},
"value": "MyElement",
"optional": false
},
"declare": false,
"span": {
"start": 220,
"end": 241,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
]
}
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 335,
"end": 368,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 342,
"end": 344,
"ctxt": 0
},
"value": "s1",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 347,
"end": 367,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 355,
"end": 366,
"ctxt": 0
},
"value": "elements1",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 369,
"end": 402,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 376,
"end": 378,
"ctxt": 0
},
"value": "s2",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 381,
"end": 401,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 389,
"end": 400,
"ctxt": 0
},
"value": "elements2",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 403,
"end": 420,
"ctxt": 0
},
"expression": {
"type": "JSXElement",
"span": {
"start": 403,
"end": 419,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "JSXMemberExpression",
"object": {
"type": "Identifier",
"span": {
"start": 404,
"end": 406,
"ctxt": 0
},
"value": "s1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 407,
"end": 416,
"ctxt": 0
},
"value": "MyElement",
"optional": false
}
},
"span": {
"start": 403,
"end": 419,
"ctxt": 0
},
"attributes": [],
"selfClosing": true,
"typeArguments": null
},
"children": [],
"closing": null
}
}
],
"interpreter": null
}