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

3106 lines
84 KiB
JSON

{
"type": "Module",
"span": {
"start": 131,
"end": 1939,
"ctxt": 0
},
"body": [
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 131,
"end": 162,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 138,
"end": 143,
"ctxt": 0
},
"value": "React",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 146,
"end": 162,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 154,
"end": 161,
"ctxt": 0
},
"value": "react",
"raw": "'react'"
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 164,
"end": 246,
"ctxt": 0
},
"declaration": {
"type": "TsInterfaceDeclaration",
"span": {
"start": 171,
"end": 246,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 181,
"end": 195,
"ctxt": 0
},
"value": "ClickableProps",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 196,
"end": 246,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 202,
"end": 220,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 202,
"end": 210,
"ctxt": 0
},
"value": "children",
"optional": false
},
"computed": false,
"optional": true,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 211,
"end": 219,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 213,
"end": 219,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 225,
"end": 244,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 225,
"end": 234,
"ctxt": 0
},
"value": "className",
"optional": false
},
"computed": false,
"optional": true,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 235,
"end": 243,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 237,
"end": 243,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 248,
"end": 346,
"ctxt": 0
},
"declaration": {
"type": "TsInterfaceDeclaration",
"span": {
"start": 255,
"end": 346,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 265,
"end": 276,
"ctxt": 0
},
"value": "ButtonProps",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [
{
"type": "TsExpressionWithTypeArguments",
"span": {
"start": 285,
"end": 299,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 285,
"end": 299,
"ctxt": 0
},
"value": "ClickableProps",
"optional": false
},
"typeArguments": null
}
],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 300,
"end": 346,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 306,
"end": 344,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 306,
"end": 313,
"ctxt": 0
},
"value": "onClick",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 313,
"end": 343,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 315,
"end": 343,
"ctxt": 0
},
"typeName": {
"type": "TsQualifiedName",
"left": {
"type": "Identifier",
"span": {
"start": 315,
"end": 320,
"ctxt": 0
},
"value": "React",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 321,
"end": 338,
"ctxt": 0
},
"value": "MouseEventHandler",
"optional": false
}
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 338,
"end": 343,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 339,
"end": 342,
"ctxt": 0
},
"kind": "any"
}
]
}
}
},
"typeParams": null
}
]
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 348,
"end": 417,
"ctxt": 0
},
"declaration": {
"type": "TsInterfaceDeclaration",
"span": {
"start": 355,
"end": 417,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 365,
"end": 374,
"ctxt": 0
},
"value": "LinkProps",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [
{
"type": "TsExpressionWithTypeArguments",
"span": {
"start": 383,
"end": 397,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 383,
"end": 397,
"ctxt": 0
},
"value": "ClickableProps",
"optional": false
},
"typeArguments": null
}
],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 398,
"end": 417,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 404,
"end": 415,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 404,
"end": 406,
"ctxt": 0
},
"value": "to",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 406,
"end": 414,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 408,
"end": 414,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 419,
"end": 501,
"ctxt": 0
},
"declaration": {
"type": "TsInterfaceDeclaration",
"span": {
"start": 426,
"end": 501,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 436,
"end": 447,
"ctxt": 0
},
"value": "HyphenProps",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [
{
"type": "TsExpressionWithTypeArguments",
"span": {
"start": 456,
"end": 470,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 456,
"end": 470,
"ctxt": 0
},
"value": "ClickableProps",
"optional": false
},
"typeArguments": null
}
],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 471,
"end": 501,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 477,
"end": 499,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "StringLiteral",
"span": {
"start": 477,
"end": 490,
"ctxt": 0
},
"value": "data-format",
"raw": "\"data-format\""
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 490,
"end": 498,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 492,
"end": 498,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 503,
"end": 550,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 507,
"end": 550,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 507,
"end": 510,
"ctxt": 0
},
"value": "obj",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 513,
"end": 550,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 519,
"end": 527,
"ctxt": 0
},
"value": "children",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 529,
"end": 533,
"ctxt": 0
},
"value": "hi",
"raw": "\"hi\""
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 539,
"end": 541,
"ctxt": 0
},
"value": "to",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 543,
"end": 548,
"ctxt": 0
},
"value": "boo",
"raw": "\"boo\""
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 551,
"end": 565,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 555,
"end": 564,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 555,
"end": 559,
"ctxt": 0
},
"value": "obj1",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 559,
"end": 564,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 561,
"end": 564,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 566,
"end": 602,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 570,
"end": 602,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 570,
"end": 574,
"ctxt": 0
},
"value": "obj2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 577,
"end": 602,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 583,
"end": 590,
"ctxt": 0
},
"value": "onClick",
"optional": false
},
"value": {
"type": "ArrowFunctionExpression",
"span": {
"start": 592,
"end": 600,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 598,
"end": 600,
"ctxt": 0
},
"stmts": []
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
]
},
"definite": false
}
]
},
{
"type": "ExportDeclaration",
"span": {
"start": 604,
"end": 670,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 620,
"end": 630,
"ctxt": 0
},
"value": "MainButton",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 631,
"end": 655,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 631,
"end": 655,
"ctxt": 0
},
"value": "buttonProps",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 642,
"end": 655,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 644,
"end": 655,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 644,
"end": 655,
"ctxt": 0
},
"value": "ButtonProps",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 611,
"end": 670,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 656,
"end": 669,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 658,
"end": 669,
"ctxt": 0
},
"typeName": {
"type": "TsQualifiedName",
"left": {
"type": "Identifier",
"span": {
"start": 658,
"end": 661,
"ctxt": 0
},
"value": "JSX",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 662,
"end": 669,
"ctxt": 0
},
"value": "Element",
"optional": false
}
},
"typeParams": null
}
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 671,
"end": 733,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 687,
"end": 697,
"ctxt": 0
},
"value": "MainButton",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 698,
"end": 718,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 698,
"end": 718,
"ctxt": 0
},
"value": "linkProps",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 707,
"end": 718,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 709,
"end": 718,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 709,
"end": 718,
"ctxt": 0
},
"value": "LinkProps",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 678,
"end": 733,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 719,
"end": 732,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 721,
"end": 732,
"ctxt": 0
},
"typeName": {
"type": "TsQualifiedName",
"left": {
"type": "Identifier",
"span": {
"start": 721,
"end": 724,
"ctxt": 0
},
"value": "JSX",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 725,
"end": 732,
"ctxt": 0
},
"value": "Element",
"optional": false
}
},
"typeParams": null
}
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 734,
"end": 800,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 750,
"end": 760,
"ctxt": 0
},
"value": "MainButton",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 761,
"end": 785,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 761,
"end": 785,
"ctxt": 0
},
"value": "hyphenProps",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 772,
"end": 785,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 774,
"end": 785,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 774,
"end": 785,
"ctxt": 0
},
"value": "HyphenProps",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 741,
"end": 800,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 786,
"end": 799,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 788,
"end": 799,
"ctxt": 0
},
"typeName": {
"type": "TsQualifiedName",
"left": {
"type": "Identifier",
"span": {
"start": 788,
"end": 791,
"ctxt": 0
},
"value": "JSX",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 792,
"end": 799,
"ctxt": 0
},
"value": "Element",
"optional": false
}
},
"typeParams": null
}
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 801,
"end": 1046,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 817,
"end": 827,
"ctxt": 0
},
"value": "MainButton",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 828,
"end": 872,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 828,
"end": 872,
"ctxt": 0
},
"value": "props",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 833,
"end": 872,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 835,
"end": 872,
"ctxt": 0
},
"types": [
{
"type": "TsTypeReference",
"span": {
"start": 835,
"end": 846,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 835,
"end": 846,
"ctxt": 0
},
"value": "ButtonProps",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 849,
"end": 858,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 849,
"end": 858,
"ctxt": 0
},
"value": "LinkProps",
"optional": false
},
"typeParams": null
},
{
"type": "TsTypeReference",
"span": {
"start": 861,
"end": 872,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 861,
"end": 872,
"ctxt": 0
},
"value": "HyphenProps",
"optional": false
},
"typeParams": null
}
]
}
}
}
}
],
"decorators": [],
"span": {
"start": 808,
"end": 1046,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 887,
"end": 1046,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 893,
"end": 930,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 899,
"end": 929,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 899,
"end": 908,
"ctxt": 0
},
"value": "linkProps",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "TsAsExpression",
"span": {
"start": 911,
"end": 929,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 911,
"end": 916,
"ctxt": 0
},
"value": "props",
"optional": false
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 920,
"end": 929,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 920,
"end": 929,
"ctxt": 0
},
"value": "LinkProps",
"optional": false
},
"typeParams": null
}
},
"definite": false
}
]
},
{
"type": "IfStatement",
"span": {
"start": 935,
"end": 1002,
"ctxt": 0
},
"test": {
"type": "MemberExpression",
"span": {
"start": 938,
"end": 950,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 938,
"end": 947,
"ctxt": 0
},
"value": "linkProps",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 948,
"end": 950,
"ctxt": 0
},
"value": "to",
"optional": false
}
},
"consequent": {
"type": "BlockStatement",
"span": {
"start": 952,
"end": 1002,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 962,
"end": 996,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 969,
"end": 995,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 969,
"end": 988,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 969,
"end": 973,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 974,
"end": 988,
"ctxt": 0
},
"value": "_buildMainLink",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 989,
"end": 994,
"ctxt": 0
},
"value": "props",
"optional": false
}
}
],
"typeArguments": null
}
}
]
},
"alternate": null
},
{
"type": "ReturnStatement",
"span": {
"start": 1008,
"end": 1044,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 1015,
"end": 1043,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 1015,
"end": 1036,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 1015,
"end": 1019,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 1020,
"end": 1036,
"ctxt": 0
},
"value": "_buildMainButton",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 1037,
"end": 1042,
"ctxt": 0
},
"value": "props",
"optional": false
}
}
],
"typeArguments": null
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 873,
"end": 886,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 875,
"end": 886,
"ctxt": 0
},
"typeName": {
"type": "TsQualifiedName",
"left": {
"type": "Identifier",
"span": {
"start": 875,
"end": 878,
"ctxt": 0
},
"value": "JSX",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 879,
"end": 886,
"ctxt": 0
},
"value": "Element",
"optional": false
}
},
"typeParams": null
}
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1054,
"end": 1109,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1060,
"end": 1108,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1060,
"end": 1062,
"ctxt": 0
},
"value": "b0",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXElement",
"span": {
"start": 1065,
"end": 1108,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 1066,
"end": 1076,
"ctxt": 0
},
"value": "MainButton",
"optional": false
},
"span": {
"start": 1065,
"end": 1093,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 1077,
"end": 1092,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1077,
"end": 1079,
"ctxt": 0
},
"value": "to",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 1080,
"end": 1092,
"ctxt": 0
},
"value": "/some/path",
"raw": "'/some/path'"
}
}
],
"selfClosing": false,
"typeArguments": null
},
"children": [
{
"type": "JSXText",
"span": {
"start": 1093,
"end": 1095,
"ctxt": 0
},
"value": "GO",
"raw": "GO"
}
],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 1095,
"end": 1108,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1097,
"end": 1107,
"ctxt": 0
},
"value": "MainButton",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1110,
"end": 1178,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1116,
"end": 1177,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1116,
"end": 1118,
"ctxt": 0
},
"value": "b1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXElement",
"span": {
"start": 1121,
"end": 1177,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 1122,
"end": 1132,
"ctxt": 0
},
"value": "MainButton",
"optional": false
},
"span": {
"start": 1121,
"end": 1153,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 1133,
"end": 1152,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1133,
"end": 1140,
"ctxt": 0
},
"value": "onClick",
"optional": false
},
"value": {
"type": "JSXExpressionContainer",
"span": {
"start": 1141,
"end": 1152,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 1142,
"end": 1151,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 1143,
"end": 1144,
"ctxt": 0
},
"value": "e",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 1149,
"end": 1151,
"ctxt": 0
},
"stmts": []
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
}
],
"selfClosing": false,
"typeArguments": null
},
"children": [
{
"type": "JSXText",
"span": {
"start": 1153,
"end": 1164,
"ctxt": 0
},
"value": "Hello world",
"raw": "Hello world"
}
],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 1164,
"end": 1177,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1166,
"end": 1176,
"ctxt": 0
},
"value": "MainButton",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1179,
"end": 1214,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1185,
"end": 1213,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1185,
"end": 1187,
"ctxt": 0
},
"value": "b2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXElement",
"span": {
"start": 1190,
"end": 1213,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 1191,
"end": 1201,
"ctxt": 0
},
"value": "MainButton",
"optional": false
},
"span": {
"start": 1190,
"end": 1213,
"ctxt": 0
},
"attributes": [
{
"type": "SpreadElement",
"spread": {
"start": 1203,
"end": 1206,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 1206,
"end": 1209,
"ctxt": 0
},
"value": "obj",
"optional": false
}
}
],
"selfClosing": true,
"typeArguments": null
},
"children": [],
"closing": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1215,
"end": 1267,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1221,
"end": 1266,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1221,
"end": 1223,
"ctxt": 0
},
"value": "b3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXElement",
"span": {
"start": 1226,
"end": 1266,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 1227,
"end": 1237,
"ctxt": 0
},
"value": "MainButton",
"optional": false
},
"span": {
"start": 1226,
"end": 1266,
"ctxt": 0
},
"attributes": [
{
"type": "SpreadElement",
"spread": {
"start": 1239,
"end": 1242,
"ctxt": 0
},
"arguments": {
"type": "ObjectExpression",
"span": {
"start": 1242,
"end": 1253,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1243,
"end": 1245,
"ctxt": 0
},
"value": "to",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 1247,
"end": 1252,
"ctxt": 0
},
"value": 10000.0
}
}
]
}
},
{
"type": "SpreadElement",
"spread": {
"start": 1256,
"end": 1259,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 1259,
"end": 1262,
"ctxt": 0
},
"value": "obj",
"optional": false
}
}
],
"selfClosing": true,
"typeArguments": null
},
"children": [],
"closing": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1268,
"end": 1304,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1274,
"end": 1303,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1274,
"end": 1276,
"ctxt": 0
},
"value": "b4",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXElement",
"span": {
"start": 1279,
"end": 1303,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 1280,
"end": 1290,
"ctxt": 0
},
"value": "MainButton",
"optional": false
},
"span": {
"start": 1279,
"end": 1303,
"ctxt": 0
},
"attributes": [
{
"type": "SpreadElement",
"spread": {
"start": 1292,
"end": 1295,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 1295,
"end": 1299,
"ctxt": 0
},
"value": "obj1",
"optional": false
}
}
],
"selfClosing": true,
"typeArguments": null
},
"children": [],
"closing": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1343,
"end": 1398,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1349,
"end": 1397,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1349,
"end": 1351,
"ctxt": 0
},
"value": "b5",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXElement",
"span": {
"start": 1354,
"end": 1397,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 1355,
"end": 1365,
"ctxt": 0
},
"value": "MainButton",
"optional": false
},
"span": {
"start": 1354,
"end": 1397,
"ctxt": 0
},
"attributes": [
{
"type": "SpreadElement",
"spread": {
"start": 1367,
"end": 1370,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 1370,
"end": 1374,
"ctxt": 0
},
"value": "obj1",
"optional": false
}
},
{
"type": "JSXAttribute",
"span": {
"start": 1376,
"end": 1394,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1376,
"end": 1378,
"ctxt": 0
},
"value": "to",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 1379,
"end": 1394,
"ctxt": 0
},
"value": "/to/somewhere",
"raw": "\"/to/somewhere\""
}
}
],
"selfClosing": true,
"typeArguments": null
},
"children": [],
"closing": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1435,
"end": 1471,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1441,
"end": 1470,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1441,
"end": 1443,
"ctxt": 0
},
"value": "b6",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXElement",
"span": {
"start": 1446,
"end": 1470,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 1447,
"end": 1457,
"ctxt": 0
},
"value": "MainButton",
"optional": false
},
"span": {
"start": 1446,
"end": 1470,
"ctxt": 0
},
"attributes": [
{
"type": "SpreadElement",
"spread": {
"start": 1459,
"end": 1462,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 1462,
"end": 1466,
"ctxt": 0
},
"value": "obj2",
"optional": false
}
}
],
"selfClosing": true,
"typeArguments": null
},
"children": [],
"closing": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1472,
"end": 1542,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1478,
"end": 1541,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1478,
"end": 1480,
"ctxt": 0
},
"value": "b7",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXElement",
"span": {
"start": 1483,
"end": 1541,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 1484,
"end": 1494,
"ctxt": 0
},
"value": "MainButton",
"optional": false
},
"span": {
"start": 1483,
"end": 1541,
"ctxt": 0
},
"attributes": [
{
"type": "SpreadElement",
"spread": {
"start": 1496,
"end": 1499,
"ctxt": 0
},
"arguments": {
"type": "ObjectExpression",
"span": {
"start": 1499,
"end": 1537,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1500,
"end": 1507,
"ctxt": 0
},
"value": "onClick",
"optional": false
},
"value": {
"type": "ArrowFunctionExpression",
"span": {
"start": 1509,
"end": 1536,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 1515,
"end": 1536,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 1517,
"end": 1534,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1517,
"end": 1534,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 1517,
"end": 1528,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1517,
"end": 1524,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1525,
"end": 1528,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 1529,
"end": 1533,
"ctxt": 0
},
"value": "hi",
"raw": "\"hi\""
}
}
],
"typeArguments": null
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
]
}
}
],
"selfClosing": true,
"typeArguments": null
},
"children": [],
"closing": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1543,
"end": 1589,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1549,
"end": 1588,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1549,
"end": 1551,
"ctxt": 0
},
"value": "b8",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXElement",
"span": {
"start": 1554,
"end": 1588,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 1555,
"end": 1565,
"ctxt": 0
},
"value": "MainButton",
"optional": false
},
"span": {
"start": 1554,
"end": 1588,
"ctxt": 0
},
"attributes": [
{
"type": "SpreadElement",
"spread": {
"start": 1567,
"end": 1570,
"ctxt": 0
},
"arguments": {
"type": "ObjectExpression",
"span": {
"start": 1570,
"end": 1584,
"ctxt": 0
},
"properties": [
{
"type": "MethodProperty",
"key": {
"type": "Identifier",
"span": {
"start": 1571,
"end": 1578,
"ctxt": 0
},
"value": "onClick",
"optional": false
},
"params": [],
"decorators": [],
"span": {
"start": 1571,
"end": 1583,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 1581,
"end": 1583,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
]
}
}
],
"selfClosing": true,
"typeArguments": null
},
"children": [],
"closing": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1650,
"end": 1716,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1656,
"end": 1715,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1656,
"end": 1658,
"ctxt": 0
},
"value": "b9",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXElement",
"span": {
"start": 1661,
"end": 1715,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 1662,
"end": 1672,
"ctxt": 0
},
"value": "MainButton",
"optional": false
},
"span": {
"start": 1661,
"end": 1700,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 1673,
"end": 1688,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1673,
"end": 1675,
"ctxt": 0
},
"value": "to",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 1676,
"end": 1688,
"ctxt": 0
},
"value": "/some/path",
"raw": "'/some/path'"
}
},
{
"type": "JSXAttribute",
"span": {
"start": 1689,
"end": 1699,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1689,
"end": 1699,
"ctxt": 0
},
"value": "extra-prop",
"optional": false
},
"value": null
}
],
"selfClosing": false,
"typeArguments": null
},
"children": [
{
"type": "JSXText",
"span": {
"start": 1700,
"end": 1702,
"ctxt": 0
},
"value": "GO",
"raw": "GO"
}
],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 1702,
"end": 1715,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1704,
"end": 1714,
"ctxt": 0
},
"value": "MainButton",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1717,
"end": 1786,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1723,
"end": 1785,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1723,
"end": 1726,
"ctxt": 0
},
"value": "b10",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXElement",
"span": {
"start": 1729,
"end": 1785,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 1730,
"end": 1740,
"ctxt": 0
},
"value": "MainButton",
"optional": false
},
"span": {
"start": 1729,
"end": 1772,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 1741,
"end": 1756,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1741,
"end": 1743,
"ctxt": 0
},
"value": "to",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 1744,
"end": 1756,
"ctxt": 0
},
"value": "/some/path",
"raw": "'/some/path'"
}
},
{
"type": "JSXAttribute",
"span": {
"start": 1757,
"end": 1770,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1757,
"end": 1765,
"ctxt": 0
},
"value": "children",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 1766,
"end": 1770,
"ctxt": 0
},
"value": "hi",
"raw": "\"hi\""
}
}
],
"selfClosing": false,
"typeArguments": null
},
"children": [],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 1772,
"end": 1785,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1774,
"end": 1784,
"ctxt": 0
},
"value": "MainButton",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1787,
"end": 1886,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1793,
"end": 1885,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1793,
"end": 1796,
"ctxt": 0
},
"value": "b11",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXElement",
"span": {
"start": 1799,
"end": 1885,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 1800,
"end": 1810,
"ctxt": 0
},
"value": "MainButton",
"optional": false
},
"span": {
"start": 1799,
"end": 1861,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 1811,
"end": 1830,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1811,
"end": 1818,
"ctxt": 0
},
"value": "onClick",
"optional": false
},
"value": {
"type": "JSXExpressionContainer",
"span": {
"start": 1819,
"end": 1830,
"ctxt": 0
},
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 1820,
"end": 1829,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 1821,
"end": 1822,
"ctxt": 0
},
"value": "e",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 1827,
"end": 1829,
"ctxt": 0
},
"stmts": []
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "JSXAttribute",
"span": {
"start": 1831,
"end": 1848,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1831,
"end": 1840,
"ctxt": 0
},
"value": "className",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 1841,
"end": 1848,
"ctxt": 0
},
"value": "hello",
"raw": "\"hello\""
}
},
{
"type": "JSXAttribute",
"span": {
"start": 1849,
"end": 1860,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1849,
"end": 1860,
"ctxt": 0
},
"value": "data-format",
"optional": false
},
"value": null
}
],
"selfClosing": false,
"typeArguments": null
},
"children": [
{
"type": "JSXText",
"span": {
"start": 1861,
"end": 1872,
"ctxt": 0
},
"value": "Hello world",
"raw": "Hello world"
}
],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 1872,
"end": 1885,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1874,
"end": 1884,
"ctxt": 0
},
"value": "MainButton",
"optional": false
}
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1887,
"end": 1939,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1893,
"end": 1939,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1893,
"end": 1896,
"ctxt": 0
},
"value": "b12",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "JSXElement",
"span": {
"start": 1899,
"end": 1939,
"ctxt": 0
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 1900,
"end": 1910,
"ctxt": 0
},
"value": "MainButton",
"optional": false
},
"span": {
"start": 1899,
"end": 1939,
"ctxt": 0
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 1911,
"end": 1936,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 1911,
"end": 1922,
"ctxt": 0
},
"value": "data-format",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 1923,
"end": 1936,
"ctxt": 0
},
"value": "Hello world",
"raw": "\"Hello world\""
}
}
],
"selfClosing": true,
"typeArguments": null
},
"children": [],
"closing": null
},
"definite": false
}
]
}
],
"interpreter": null
}