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

144 lines
3.1 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 63,
"end": 152,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 63,
"end": 108,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 78,
"end": 81,
"ctxt": 0
},
"value": "JSX",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 82,
"end": 108,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 85,
"end": 106,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 95,
"end": 102,
"ctxt": 0
},
"value": "Element",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 103,
"end": 106,
"ctxt": 0
},
"body": []
}
}
]
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 138,
"end": 152,
"ctxt": 0
},
"expression": {
"type": "JSXElement",
"span": {
"start": 138,
"end": 151,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 139,
"end": 142,
"ctxt": 0
},
"value": "div",
"optional": false
},
"span": {
"start": 138,
"end": 151,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 143,
"end": 148,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 143,
"end": 144,
"ctxt": 0
},
"value": "n",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 145,
"end": 148,
"ctxt": 0
},
"value": "x",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"selfClosing": true,
"typeArguments": null
},
"children": [],
"closing": null
}
}
],
"interpreter": null
}