swc/crates/swc_ecma_parser/tests/tsc/tsxReactEmit2.json
2022-02-04 17:08:38 +09:00

1065 lines
28 KiB
JSON

{
"type": "Script",
"span": {
"start": 36,
"end": 420,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 36,
"end": 135,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 51,
"end": 54,
"ctxt": 0
},
"value": "JSX",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 55,
"end": 135,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 58,
"end": 79,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 68,
"end": 75,
"ctxt": 0
},
"value": "Element",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 76,
"end": 79,
"ctxt": 0
},
"body": []
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 81,
"end": 133,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 91,
"end": 108,
"ctxt": 0
},
"value": "IntrinsicElements",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 109,
"end": 133,
"ctxt": 0
},
"body": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 114,
"end": 123,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 115,
"end": 123,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 117,
"end": 123,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 124,
"end": 129,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 126,
"end": 129,
"ctxt": 0
},
"kind": "any"
}
},
"readonly": false,
"static": false,
"span": {
"start": 113,
"end": 130,
"ctxt": 0
}
}
]
}
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 136,
"end": 159,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 148,
"end": 158,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 148,
"end": 153,
"ctxt": 0
},
"value": "React",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 153,
"end": 158,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 155,
"end": 158,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 161,
"end": 191,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 165,
"end": 172,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 165,
"end": 167,
"ctxt": 0
},
"value": "p1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 167,
"end": 172,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 169,
"end": 172,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 174,
"end": 181,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 174,
"end": 176,
"ctxt": 0
},
"value": "p2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 176,
"end": 181,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 178,
"end": 181,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": null,
"definite": false
},
{
"type": "VariableDeclarator",
"span": {
"start": 183,
"end": 190,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 183,
"end": 185,
"ctxt": 0
},
"value": "p3",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 185,
"end": 190,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 187,
"end": 190,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 192,
"end": 231,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 196,
"end": 230,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 196,
"end": 204,
"ctxt": 0
},
"value": "spreads1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXElement",
"span": {
"start": 207,
"end": 230,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 208,
"end": 211,
"ctxt": 0
},
"value": "div",
"optional": false
},
"span": {
"start": 207,
"end": 220,
"ctxt": 0
},
"attributes": [
{
"type": "SpreadElement",
"spread": {
"start": 213,
"end": 216,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 216,
"end": 218,
"ctxt": 0
},
"value": "p1",
"optional": false
}
}
],
"selfClosing": false,
"typeArguments": null
},
"children": [
{
"type": "JSXExpressionContainer",
"span": {
"start": 220,
"end": 224,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 221,
"end": 223,
"ctxt": 0
},
"value": "p2",
"optional": false
}
}
],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 224,
"end": 230,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 226,
"end": 229,
"ctxt": 0
},
"value": "div",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 232,
"end": 271,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 236,
"end": 270,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 236,
"end": 244,
"ctxt": 0
},
"value": "spreads2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXElement",
"span": {
"start": 247,
"end": 270,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 248,
"end": 251,
"ctxt": 0
},
"value": "div",
"optional": false
},
"span": {
"start": 247,
"end": 260,
"ctxt": 0
},
"attributes": [
{
"type": "SpreadElement",
"spread": {
"start": 253,
"end": 256,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 256,
"end": 258,
"ctxt": 0
},
"value": "p1",
"optional": false
}
}
],
"selfClosing": false,
"typeArguments": null
},
"children": [
{
"type": "JSXExpressionContainer",
"span": {
"start": 260,
"end": 264,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 261,
"end": 263,
"ctxt": 0
},
"value": "p2",
"optional": false
}
}
],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 264,
"end": 270,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 266,
"end": 269,
"ctxt": 0
},
"value": "div",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 272,
"end": 318,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 276,
"end": 317,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 276,
"end": 284,
"ctxt": 0
},
"value": "spreads3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXElement",
"span": {
"start": 287,
"end": 317,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 288,
"end": 291,
"ctxt": 0
},
"value": "div",
"optional": false
},
"span": {
"start": 287,
"end": 307,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 292,
"end": 298,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 292,
"end": 293,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "JSXExpressionContainer",
"span": {
"start": 294,
"end": 298,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 295,
"end": 297,
"ctxt": 0
},
"value": "p3",
"optional": false
}
}
},
{
"type": "SpreadElement",
"spread": {
"start": 300,
"end": 303,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 303,
"end": 305,
"ctxt": 0
},
"value": "p1",
"optional": false
}
}
],
"selfClosing": false,
"typeArguments": null
},
"children": [
{
"type": "JSXExpressionContainer",
"span": {
"start": 307,
"end": 311,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 308,
"end": 310,
"ctxt": 0
},
"value": "p2",
"optional": false
}
}
],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 311,
"end": 317,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 313,
"end": 316,
"ctxt": 0
},
"value": "div",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 319,
"end": 366,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 323,
"end": 365,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 323,
"end": 331,
"ctxt": 0
},
"value": "spreads4",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXElement",
"span": {
"start": 334,
"end": 365,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 335,
"end": 338,
"ctxt": 0
},
"value": "div",
"optional": false
},
"span": {
"start": 334,
"end": 355,
"ctxt": 0
},
"attributes": [
{
"type": "SpreadElement",
"spread": {
"start": 340,
"end": 343,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 343,
"end": 345,
"ctxt": 0
},
"value": "p1",
"optional": false
}
},
{
"type": "JSXAttribute",
"span": {
"start": 347,
"end": 353,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 347,
"end": 348,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "JSXExpressionContainer",
"span": {
"start": 349,
"end": 353,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 350,
"end": 352,
"ctxt": 0
},
"value": "p3",
"optional": false
}
}
}
],
"selfClosing": false,
"typeArguments": null
},
"children": [
{
"type": "JSXExpressionContainer",
"span": {
"start": 355,
"end": 359,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 356,
"end": 358,
"ctxt": 0
},
"value": "p2",
"optional": false
}
}
],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 359,
"end": 365,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 361,
"end": 364,
"ctxt": 0
},
"value": "div",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 367,
"end": 420,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 371,
"end": 419,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 371,
"end": 379,
"ctxt": 0
},
"value": "spreads5",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXElement",
"span": {
"start": 382,
"end": 419,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 383,
"end": 386,
"ctxt": 0
},
"value": "div",
"optional": false
},
"span": {
"start": 382,
"end": 409,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 387,
"end": 393,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 387,
"end": 388,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "JSXExpressionContainer",
"span": {
"start": 389,
"end": 393,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 390,
"end": 392,
"ctxt": 0
},
"value": "p2",
"optional": false
}
}
},
{
"type": "SpreadElement",
"spread": {
"start": 395,
"end": 398,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 398,
"end": 400,
"ctxt": 0
},
"value": "p1",
"optional": false
}
},
{
"type": "JSXAttribute",
"span": {
"start": 402,
"end": 408,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 402,
"end": 403,
"ctxt": 0
},
"value": "y",
"optional": false
},
"value": {
"type": "JSXExpressionContainer",
"span": {
"start": 404,
"end": 408,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 405,
"end": 407,
"ctxt": 0
},
"value": "p3",
"optional": false
}
}
}
],
"selfClosing": false,
"typeArguments": null
},
"children": [
{
"type": "JSXExpressionContainer",
"span": {
"start": 409,
"end": 413,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 410,
"end": 412,
"ctxt": 0
},
"value": "p2",
"optional": false
}
}
],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 413,
"end": 419,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 415,
"end": 418,
"ctxt": 0
},
"value": "div",
"optional": false
}
}
},
"definite": false
}
]
}
],
"interpreter": null
}