mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 11:13:43 +03:00
876 lines
22 KiB
JSON
876 lines
22 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 39,
|
|
"end": 444,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsModuleDeclaration",
|
|
"span": {
|
|
"start": 39,
|
|
"end": 158,
|
|
"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": 158,
|
|
"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": 123,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 94,
|
|
"end": 119,
|
|
"ctxt": 0
|
|
},
|
|
"value": "ElementAttributesProperty",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"typeParams": null,
|
|
"extends": [],
|
|
"body": {
|
|
"type": "TsInterfaceBody",
|
|
"span": {
|
|
"start": 120,
|
|
"end": 123,
|
|
"ctxt": 0
|
|
},
|
|
"body": []
|
|
}
|
|
},
|
|
{
|
|
"type": "TsInterfaceDeclaration",
|
|
"span": {
|
|
"start": 125,
|
|
"end": 156,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 135,
|
|
"end": 152,
|
|
"ctxt": 0
|
|
},
|
|
"value": "IntrinsicElements",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"typeParams": null,
|
|
"extends": [],
|
|
"body": {
|
|
"type": "TsInterfaceBody",
|
|
"span": {
|
|
"start": 153,
|
|
"end": 156,
|
|
"ctxt": 0
|
|
},
|
|
"body": []
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "TsInterfaceDeclaration",
|
|
"span": {
|
|
"start": 160,
|
|
"end": 204,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 170,
|
|
"end": 178,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Obj1type",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"typeParams": null,
|
|
"extends": [],
|
|
"body": {
|
|
"type": "TsInterfaceBody",
|
|
"span": {
|
|
"start": 179,
|
|
"end": 204,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsConstructSignatureDeclaration",
|
|
"span": {
|
|
"start": 182,
|
|
"end": 202,
|
|
"ctxt": 0
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 186,
|
|
"end": 195,
|
|
"ctxt": 0
|
|
},
|
|
"value": "n",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 187,
|
|
"end": 195,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 189,
|
|
"end": 195,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 196,
|
|
"end": 201,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 198,
|
|
"end": 201,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "any"
|
|
}
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 205,
|
|
"end": 224,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 209,
|
|
"end": 223,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 209,
|
|
"end": 213,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Obj1",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 213,
|
|
"end": 223,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 215,
|
|
"end": 223,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 215,
|
|
"end": 223,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Obj1type",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 225,
|
|
"end": 241,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "JSXElement",
|
|
"span": {
|
|
"start": 225,
|
|
"end": 240,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningElement",
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 226,
|
|
"end": 230,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Obj1",
|
|
"optional": false
|
|
},
|
|
"span": {
|
|
"start": 225,
|
|
"end": 240,
|
|
"ctxt": 0
|
|
},
|
|
"attributes": [
|
|
{
|
|
"type": "JSXAttribute",
|
|
"span": {
|
|
"start": 231,
|
|
"end": 237,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 231,
|
|
"end": 232,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "JSXExpressionContainer",
|
|
"span": {
|
|
"start": 233,
|
|
"end": 237,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 234,
|
|
"end": 236,
|
|
"ctxt": 0
|
|
},
|
|
"value": 10.0
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"selfClosing": true,
|
|
"typeArguments": null
|
|
},
|
|
"children": [],
|
|
"closing": null
|
|
}
|
|
},
|
|
{
|
|
"type": "TsInterfaceDeclaration",
|
|
"span": {
|
|
"start": 249,
|
|
"end": 304,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 259,
|
|
"end": 267,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Obj2type",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"typeParams": null,
|
|
"extends": [],
|
|
"body": {
|
|
"type": "TsInterfaceBody",
|
|
"span": {
|
|
"start": 268,
|
|
"end": 304,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsConstructSignatureDeclaration",
|
|
"span": {
|
|
"start": 271,
|
|
"end": 302,
|
|
"ctxt": 0
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 275,
|
|
"end": 284,
|
|
"ctxt": 0
|
|
},
|
|
"value": "n",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 276,
|
|
"end": 284,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 278,
|
|
"end": 284,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 285,
|
|
"end": 301,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeLiteral",
|
|
"span": {
|
|
"start": 287,
|
|
"end": 301,
|
|
"ctxt": 0
|
|
},
|
|
"members": [
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 289,
|
|
"end": 299,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 289,
|
|
"end": 290,
|
|
"ctxt": 0
|
|
},
|
|
"value": "q",
|
|
"optional": false
|
|
},
|
|
"computed": false,
|
|
"optional": true,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 291,
|
|
"end": 299,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 293,
|
|
"end": 299,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 305,
|
|
"end": 324,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 309,
|
|
"end": 323,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 309,
|
|
"end": 313,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Obj2",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 313,
|
|
"end": 323,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 315,
|
|
"end": 323,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 315,
|
|
"end": 323,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Obj2type",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 325,
|
|
"end": 341,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "JSXElement",
|
|
"span": {
|
|
"start": 325,
|
|
"end": 340,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningElement",
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 326,
|
|
"end": 330,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Obj2",
|
|
"optional": false
|
|
},
|
|
"span": {
|
|
"start": 325,
|
|
"end": 340,
|
|
"ctxt": 0
|
|
},
|
|
"attributes": [
|
|
{
|
|
"type": "JSXAttribute",
|
|
"span": {
|
|
"start": 331,
|
|
"end": 337,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 331,
|
|
"end": 332,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "JSXExpressionContainer",
|
|
"span": {
|
|
"start": 333,
|
|
"end": 337,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 334,
|
|
"end": 336,
|
|
"ctxt": 0
|
|
},
|
|
"value": 10.0
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"selfClosing": true,
|
|
"typeArguments": null
|
|
},
|
|
"children": [],
|
|
"closing": null
|
|
}
|
|
},
|
|
{
|
|
"type": "TsInterfaceDeclaration",
|
|
"span": {
|
|
"start": 352,
|
|
"end": 407,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 362,
|
|
"end": 370,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Obj3type",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"typeParams": null,
|
|
"extends": [],
|
|
"body": {
|
|
"type": "TsInterfaceBody",
|
|
"span": {
|
|
"start": 371,
|
|
"end": 407,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsConstructSignatureDeclaration",
|
|
"span": {
|
|
"start": 374,
|
|
"end": 405,
|
|
"ctxt": 0
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 378,
|
|
"end": 387,
|
|
"ctxt": 0
|
|
},
|
|
"value": "n",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 379,
|
|
"end": 387,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 381,
|
|
"end": 387,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 388,
|
|
"end": 404,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeLiteral",
|
|
"span": {
|
|
"start": 390,
|
|
"end": 404,
|
|
"ctxt": 0
|
|
},
|
|
"members": [
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 392,
|
|
"end": 402,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 392,
|
|
"end": 393,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"computed": false,
|
|
"optional": false,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 393,
|
|
"end": 401,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 395,
|
|
"end": 401,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "number"
|
|
}
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 408,
|
|
"end": 427,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 412,
|
|
"end": 426,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 412,
|
|
"end": 416,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Obj3",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 416,
|
|
"end": 426,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 418,
|
|
"end": 426,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 418,
|
|
"end": 426,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Obj3type",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
},
|
|
"init": null,
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"span": {
|
|
"start": 428,
|
|
"end": 444,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "JSXElement",
|
|
"span": {
|
|
"start": 428,
|
|
"end": 443,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningElement",
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 429,
|
|
"end": 433,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Obj3",
|
|
"optional": false
|
|
},
|
|
"span": {
|
|
"start": 428,
|
|
"end": 443,
|
|
"ctxt": 0
|
|
},
|
|
"attributes": [
|
|
{
|
|
"type": "JSXAttribute",
|
|
"span": {
|
|
"start": 434,
|
|
"end": 440,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 434,
|
|
"end": 435,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "JSXExpressionContainer",
|
|
"span": {
|
|
"start": 436,
|
|
"end": 440,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "NumericLiteral",
|
|
"span": {
|
|
"start": 437,
|
|
"end": 439,
|
|
"ctxt": 0
|
|
},
|
|
"value": 10.0
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"selfClosing": true,
|
|
"typeArguments": null
|
|
},
|
|
"children": [],
|
|
"closing": null
|
|
}
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|