mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 02:29:04 +03:00
482 lines
12 KiB
JSON
482 lines
12 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 57,
|
|
"end": 393,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsModuleDeclaration",
|
|
"span": {
|
|
"start": 57,
|
|
"end": 239,
|
|
"ctxt": 0
|
|
},
|
|
"declare": true,
|
|
"global": false,
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 72,
|
|
"end": 75,
|
|
"ctxt": 0
|
|
},
|
|
"value": "JSX",
|
|
"optional": false
|
|
},
|
|
"body": {
|
|
"type": "TsModuleBlock",
|
|
"span": {
|
|
"start": 76,
|
|
"end": 239,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsInterfaceDeclaration",
|
|
"span": {
|
|
"start": 79,
|
|
"end": 100,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 89,
|
|
"end": 96,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Element",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"typeParams": null,
|
|
"extends": [],
|
|
"body": {
|
|
"type": "TsInterfaceBody",
|
|
"span": {
|
|
"start": 97,
|
|
"end": 100,
|
|
"ctxt": 0
|
|
},
|
|
"body": []
|
|
}
|
|
},
|
|
{
|
|
"type": "TsInterfaceDeclaration",
|
|
"span": {
|
|
"start": 102,
|
|
"end": 134,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 112,
|
|
"end": 129,
|
|
"ctxt": 0
|
|
},
|
|
"value": "IntrinsicElements",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"typeParams": null,
|
|
"extends": [],
|
|
"body": {
|
|
"type": "TsInterfaceBody",
|
|
"span": {
|
|
"start": 130,
|
|
"end": 134,
|
|
"ctxt": 0
|
|
},
|
|
"body": []
|
|
}
|
|
},
|
|
{
|
|
"type": "TsInterfaceDeclaration",
|
|
"span": {
|
|
"start": 136,
|
|
"end": 185,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 146,
|
|
"end": 171,
|
|
"ctxt": 0
|
|
},
|
|
"value": "ElementAttributesProperty",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"typeParams": null,
|
|
"extends": [],
|
|
"body": {
|
|
"type": "TsInterfaceBody",
|
|
"span": {
|
|
"start": 172,
|
|
"end": 185,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 176,
|
|
"end": 182,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 176,
|
|
"end": 181,
|
|
"ctxt": 0
|
|
},
|
|
"value": "props",
|
|
"optional": false
|
|
},
|
|
"computed": false,
|
|
"optional": false,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": null,
|
|
"typeParams": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "TsInterfaceDeclaration",
|
|
"span": {
|
|
"start": 187,
|
|
"end": 237,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 197,
|
|
"end": 216,
|
|
"ctxt": 0
|
|
},
|
|
"value": "IntrinsicAttributes",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"typeParams": null,
|
|
"extends": [],
|
|
"body": {
|
|
"type": "TsInterfaceBody",
|
|
"span": {
|
|
"start": 217,
|
|
"end": 237,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 221,
|
|
"end": 234,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 221,
|
|
"end": 224,
|
|
"ctxt": 0
|
|
},
|
|
"value": "ref",
|
|
"optional": false
|
|
},
|
|
"computed": false,
|
|
"optional": true,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 225,
|
|
"end": 233,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 227,
|
|
"end": 233,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
}
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 269,
|
|
"end": 280,
|
|
"ctxt": 0
|
|
},
|
|
"value": "MyComponent",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 263,
|
|
"end": 336,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "ClassMethod",
|
|
"span": {
|
|
"start": 287,
|
|
"end": 301,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 287,
|
|
"end": 293,
|
|
"ctxt": 0
|
|
},
|
|
"value": "render",
|
|
"optional": false
|
|
},
|
|
"function": {
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 287,
|
|
"end": 301,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 296,
|
|
"end": 301,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": []
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
"kind": "method",
|
|
"isStatic": false,
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false
|
|
},
|
|
{
|
|
"type": "ClassProperty",
|
|
"span": {
|
|
"start": 305,
|
|
"end": 334,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 305,
|
|
"end": 310,
|
|
"ctxt": 0
|
|
},
|
|
"value": "props",
|
|
"optional": false
|
|
},
|
|
"value": null,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 310,
|
|
"end": 334,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeLiteral",
|
|
"span": {
|
|
"start": 312,
|
|
"end": 334,
|
|
"ctxt": 0
|
|
},
|
|
"members": [
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 317,
|
|
"end": 330,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 317,
|
|
"end": 320,
|
|
"ctxt": 0
|
|
},
|
|
"value": "ref",
|
|
"optional": false
|
|
},
|
|
"computed": false,
|
|
"optional": true,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 321,
|
|
"end": 329,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 323,
|
|
"end": 329,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
}
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"isStatic": false,
|
|
"decorators": [],
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false,
|
|
"readonly": false,
|
|
"declare": false,
|
|
"definite": false
|
|
}
|
|
],
|
|
"superClass": null,
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": null,
|
|
"implements": []
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 357,
|
|
"end": 393,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "var",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 361,
|
|
"end": 392,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 361,
|
|
"end": 362,
|
|
"ctxt": 0
|
|
},
|
|
"value": "x",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "JSXElement",
|
|
"span": {
|
|
"start": 365,
|
|
"end": 392,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningElement",
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 366,
|
|
"end": 377,
|
|
"ctxt": 0
|
|
},
|
|
"value": "MyComponent",
|
|
"optional": false
|
|
},
|
|
"span": {
|
|
"start": 365,
|
|
"end": 392,
|
|
"ctxt": 0
|
|
},
|
|
"attributes": [
|
|
{
|
|
"type": "JSXAttribute",
|
|
"span": {
|
|
"start": 378,
|
|
"end": 389,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 378,
|
|
"end": 381,
|
|
"ctxt": 0
|
|
},
|
|
"value": "bar",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 382,
|
|
"end": 389,
|
|
"ctxt": 0
|
|
},
|
|
"value": "world",
|
|
"raw": "'world'"
|
|
}
|
|
}
|
|
],
|
|
"selfClosing": true,
|
|
"typeArguments": null
|
|
},
|
|
"children": [],
|
|
"closing": null
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|