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

222 lines
5.1 KiB
JSON

{
"type": "Script",
"span": {
"start": 39,
"end": 164,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 39,
"end": 129,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 54,
"end": 57,
"ctxt": 0
},
"value": "JSX",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 58,
"end": 129,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 61,
"end": 82,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 71,
"end": 78,
"ctxt": 0
},
"value": "Element",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 79,
"end": 82,
"ctxt": 0
},
"body": []
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 84,
"end": 127,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 94,
"end": 111,
"ctxt": 0
},
"value": "IntrinsicElements",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 112,
"end": 127,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 116,
"end": 124,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 116,
"end": 119,
"ctxt": 0
},
"value": "div",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 119,
"end": 124,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 121,
"end": 124,
"ctxt": 0
},
"kind": "any"
}
},
"typeParams": null
}
]
}
}
]
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 137,
"end": 145,
"ctxt": 0
},
"expression": {
"type": "JSXElement",
"span": {
"start": 137,
"end": 144,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 138,
"end": 141,
"ctxt": 0
},
"value": "div",
"optional": false
},
"span": {
"start": 137,
"end": 144,
"ctxt": 0
},
"attributes": [],
"selfClosing": true,
"typeArguments": null
},
"children": [],
"closing": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 155,
"end": 164,
"ctxt": 0
},
"expression": {
"type": "JSXElement",
"span": {
"start": 155,
"end": 163,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 156,
"end": 160,
"ctxt": 0
},
"value": "span",
"optional": false
},
"span": {
"start": 155,
"end": 163,
"ctxt": 0
},
"attributes": [],
"selfClosing": true,
"typeArguments": null
},
"children": [],
"closing": null
}
}
],
"interpreter": null
}