swc/crates/swc_ecma_parser/tests/tsc/tsxElementResolution4.json
2022-03-22 07:54:08 +00:00

473 lines
13 KiB
JSON

{
"type": "Script",
"span": {
"start": 39,
"end": 242,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 39,
"end": 171,
"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": 171,
"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": 169,
"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": 169,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 119,
"end": 139,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 119,
"end": 122,
"ctxt": 0
},
"value": "div",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 122,
"end": 138,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 124,
"end": 138,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 126,
"end": 136,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 126,
"end": 127,
"ctxt": 0
},
"value": "n",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 127,
"end": 135,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 129,
"end": 135,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 145,
"end": 166,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 145,
"end": 149,
"ctxt": 0
},
"value": "span",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 149,
"end": 165,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 151,
"end": 165,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 153,
"end": 163,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 153,
"end": 154,
"ctxt": 0
},
"value": "m",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 154,
"end": 162,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 156,
"end": 162,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
},
"typeParams": null
}
]
}
}
]
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 179,
"end": 193,
"ctxt": 0
},
"expression": {
"type": "JSXElement",
"span": {
"start": 179,
"end": 192,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 180,
"end": 183,
"ctxt": 0
},
"value": "div",
"optional": false
},
"span": {
"start": 179,
"end": 192,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 184,
"end": 189,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 184,
"end": 185,
"ctxt": 0
},
"value": "n",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 186,
"end": 189,
"ctxt": 0
},
"value": "x",
"raw": "'x'"
}
}
],
"selfClosing": true,
"typeArguments": null
},
"children": [],
"closing": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 201,
"end": 217,
"ctxt": 0
},
"expression": {
"type": "JSXElement",
"span": {
"start": 201,
"end": 216,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 202,
"end": 206,
"ctxt": 0
},
"value": "span",
"optional": false
},
"span": {
"start": 201,
"end": 216,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 207,
"end": 213,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 207,
"end": 208,
"ctxt": 0
},
"value": "m",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 209,
"end": 213,
"ctxt": 0
},
"value": "ok",
"raw": "'ok'"
}
}
],
"selfClosing": true,
"typeArguments": null
},
"children": [],
"closing": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 228,
"end": 242,
"ctxt": 0
},
"expression": {
"type": "JSXElement",
"span": {
"start": 228,
"end": 241,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 229,
"end": 233,
"ctxt": 0
},
"value": "span",
"optional": false
},
"span": {
"start": 228,
"end": 241,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 234,
"end": 238,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 234,
"end": 235,
"ctxt": 0
},
"value": "q",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 236,
"end": 238,
"ctxt": 0
},
"value": "",
"raw": "''"
}
}
],
"selfClosing": true,
"typeArguments": null
},
"children": [],
"closing": null
}
}
],
"interpreter": null
}