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

242 lines
5.8 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 55,
"end": 291,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 55,
"end": 154,
"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": 154,
"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": 152,
"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": 152,
"ctxt": 0
},
"body": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 133,
"end": 142,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 134,
"end": 142,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 136,
"end": 142,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 143,
"end": 148,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 145,
"end": 148,
"ctxt": 0
},
"kind": "any"
}
},
"readonly": false,
"static": false,
"span": {
"start": 132,
"end": 149,
"ctxt": 0
}
}
]
}
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 179,
"end": 196,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 186,
"end": 196,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 190,
"end": 195,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 190,
"end": 195,
"ctxt": 0
},
"value": "React",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 262,
"end": 291,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 270,
"end": 275,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 270,
"end": 275,
"ctxt": 0
},
"value": "React",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 282,
"end": 290,
"ctxt": 0
},
"value": "./test",
"raw": "\"./test\""
},
"typeOnly": false,
"asserts": null
}
],
"interpreter": null
}