mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 11:11:30 +03:00
870 lines
23 KiB
JSON
870 lines
23 KiB
JSON
{
|
|
"type": "Module",
|
|
"span": {
|
|
"start": 115,
|
|
"end": 624,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "TsImportEqualsDeclaration",
|
|
"span": {
|
|
"start": 115,
|
|
"end": 147,
|
|
"ctxt": 0
|
|
},
|
|
"declare": false,
|
|
"isExport": false,
|
|
"isTypeOnly": false,
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 122,
|
|
"end": 127,
|
|
"ctxt": 0
|
|
},
|
|
"value": "React",
|
|
"optional": false
|
|
},
|
|
"moduleRef": {
|
|
"type": "TsExternalModuleReference",
|
|
"span": {
|
|
"start": 130,
|
|
"end": 146,
|
|
"ctxt": 0
|
|
},
|
|
"expression": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 138,
|
|
"end": 145,
|
|
"ctxt": 0
|
|
},
|
|
"value": "react",
|
|
"raw": "'react'"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "TsTypeAliasDeclaration",
|
|
"span": {
|
|
"start": 149,
|
|
"end": 257,
|
|
"ctxt": 0
|
|
},
|
|
"declare": false,
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 154,
|
|
"end": 163,
|
|
"ctxt": 0
|
|
},
|
|
"value": "TextProps",
|
|
"optional": false
|
|
},
|
|
"typeParams": null,
|
|
"typeAnnotation": {
|
|
"type": "TsUnionType",
|
|
"span": {
|
|
"start": 166,
|
|
"end": 256,
|
|
"ctxt": 0
|
|
},
|
|
"types": [
|
|
{
|
|
"type": "TsTypeLiteral",
|
|
"span": {
|
|
"start": 166,
|
|
"end": 185,
|
|
"ctxt": 0
|
|
},
|
|
"members": [
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 168,
|
|
"end": 183,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 168,
|
|
"end": 176,
|
|
"ctxt": 0
|
|
},
|
|
"value": "editable",
|
|
"optional": false
|
|
},
|
|
"computed": false,
|
|
"optional": false,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 176,
|
|
"end": 183,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsLiteralType",
|
|
"span": {
|
|
"start": 178,
|
|
"end": 183,
|
|
"ctxt": 0
|
|
},
|
|
"literal": {
|
|
"type": "BooleanLiteral",
|
|
"span": {
|
|
"start": 178,
|
|
"end": 183,
|
|
"ctxt": 0
|
|
},
|
|
"value": false
|
|
}
|
|
}
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "TsTypeLiteral",
|
|
"span": {
|
|
"start": 203,
|
|
"end": 256,
|
|
"ctxt": 0
|
|
},
|
|
"members": [
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 205,
|
|
"end": 220,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 205,
|
|
"end": 213,
|
|
"ctxt": 0
|
|
},
|
|
"value": "editable",
|
|
"optional": false
|
|
},
|
|
"computed": false,
|
|
"optional": false,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 213,
|
|
"end": 219,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsLiteralType",
|
|
"span": {
|
|
"start": 215,
|
|
"end": 219,
|
|
"ctxt": 0
|
|
},
|
|
"literal": {
|
|
"type": "BooleanLiteral",
|
|
"span": {
|
|
"start": 215,
|
|
"end": 219,
|
|
"ctxt": 0
|
|
},
|
|
"value": true
|
|
}
|
|
}
|
|
},
|
|
"typeParams": null
|
|
},
|
|
{
|
|
"type": "TsPropertySignature",
|
|
"span": {
|
|
"start": 221,
|
|
"end": 254,
|
|
"ctxt": 0
|
|
},
|
|
"readonly": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 221,
|
|
"end": 227,
|
|
"ctxt": 0
|
|
},
|
|
"value": "onEdit",
|
|
"optional": false
|
|
},
|
|
"computed": false,
|
|
"optional": false,
|
|
"init": null,
|
|
"params": [],
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 227,
|
|
"end": 254,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsFunctionType",
|
|
"span": {
|
|
"start": 229,
|
|
"end": 254,
|
|
"ctxt": 0
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 230,
|
|
"end": 245,
|
|
"ctxt": 0
|
|
},
|
|
"value": "newText",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 237,
|
|
"end": 245,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 239,
|
|
"end": 245,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "string"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"typeParams": null,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 247,
|
|
"end": 254,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 250,
|
|
"end": 254,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "void"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"typeParams": null
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 265,
|
|
"end": 278,
|
|
"ctxt": 0
|
|
},
|
|
"value": "TextComponent",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"span": {
|
|
"start": 259,
|
|
"end": 383,
|
|
"ctxt": 0
|
|
},
|
|
"decorators": [],
|
|
"body": [
|
|
{
|
|
"type": "ClassMethod",
|
|
"span": {
|
|
"start": 324,
|
|
"end": 381,
|
|
"ctxt": 0
|
|
},
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 324,
|
|
"end": 330,
|
|
"ctxt": 0
|
|
},
|
|
"value": "render",
|
|
"optional": false
|
|
},
|
|
"function": {
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 324,
|
|
"end": 381,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 333,
|
|
"end": 381,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ReturnStatement",
|
|
"span": {
|
|
"start": 343,
|
|
"end": 375,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "JSXElement",
|
|
"span": {
|
|
"start": 350,
|
|
"end": 374,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningElement",
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 351,
|
|
"end": 355,
|
|
"ctxt": 0
|
|
},
|
|
"value": "span",
|
|
"optional": false
|
|
},
|
|
"span": {
|
|
"start": 350,
|
|
"end": 356,
|
|
"ctxt": 0
|
|
},
|
|
"attributes": [],
|
|
"selfClosing": false,
|
|
"typeArguments": null
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "JSXText",
|
|
"span": {
|
|
"start": 356,
|
|
"end": 367,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Some Text..",
|
|
"raw": "Some Text.."
|
|
}
|
|
],
|
|
"closing": {
|
|
"type": "JSXClosingElement",
|
|
"span": {
|
|
"start": 367,
|
|
"end": 374,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 369,
|
|
"end": 373,
|
|
"ctxt": 0
|
|
},
|
|
"value": "span",
|
|
"optional": false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
},
|
|
"kind": "method",
|
|
"isStatic": false,
|
|
"accessibility": null,
|
|
"isAbstract": false,
|
|
"isOptional": false,
|
|
"isOverride": false
|
|
}
|
|
],
|
|
"superClass": {
|
|
"type": "MemberExpression",
|
|
"span": {
|
|
"start": 287,
|
|
"end": 302,
|
|
"ctxt": 0
|
|
},
|
|
"object": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 287,
|
|
"end": 292,
|
|
"ctxt": 0
|
|
},
|
|
"value": "React",
|
|
"optional": false
|
|
},
|
|
"property": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 293,
|
|
"end": 302,
|
|
"ctxt": 0
|
|
},
|
|
"value": "Component",
|
|
"optional": false
|
|
}
|
|
},
|
|
"isAbstract": false,
|
|
"typeParams": null,
|
|
"superTypeParams": {
|
|
"type": "TsTypeParameterInstantiation",
|
|
"span": {
|
|
"start": 302,
|
|
"end": 317,
|
|
"ctxt": 0
|
|
},
|
|
"params": [
|
|
{
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 303,
|
|
"end": 312,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 303,
|
|
"end": 312,
|
|
"ctxt": 0
|
|
},
|
|
"value": "TextProps",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
},
|
|
{
|
|
"type": "TsTypeLiteral",
|
|
"span": {
|
|
"start": 314,
|
|
"end": 316,
|
|
"ctxt": 0
|
|
},
|
|
"members": []
|
|
}
|
|
]
|
|
},
|
|
"implements": []
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 391,
|
|
"end": 449,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "const",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 397,
|
|
"end": 448,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 397,
|
|
"end": 411,
|
|
"ctxt": 0
|
|
},
|
|
"value": "textPropsFalse",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 411,
|
|
"end": 422,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 413,
|
|
"end": 422,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 413,
|
|
"end": 422,
|
|
"ctxt": 0
|
|
},
|
|
"value": "TextProps",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
},
|
|
"init": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 425,
|
|
"end": 448,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 431,
|
|
"end": 439,
|
|
"ctxt": 0
|
|
},
|
|
"value": "editable",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "BooleanLiteral",
|
|
"span": {
|
|
"start": 441,
|
|
"end": 446,
|
|
"ctxt": 0
|
|
},
|
|
"value": false
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 451,
|
|
"end": 497,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 455,
|
|
"end": 497,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 455,
|
|
"end": 457,
|
|
"ctxt": 0
|
|
},
|
|
"value": "y1",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "JSXElement",
|
|
"span": {
|
|
"start": 460,
|
|
"end": 497,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningElement",
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 461,
|
|
"end": 474,
|
|
"ctxt": 0
|
|
},
|
|
"value": "TextComponent",
|
|
"optional": false
|
|
},
|
|
"span": {
|
|
"start": 460,
|
|
"end": 497,
|
|
"ctxt": 0
|
|
},
|
|
"attributes": [
|
|
{
|
|
"type": "SpreadElement",
|
|
"spread": {
|
|
"start": 476,
|
|
"end": 479,
|
|
"ctxt": 0
|
|
},
|
|
"arguments": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 479,
|
|
"end": 493,
|
|
"ctxt": 0
|
|
},
|
|
"value": "textPropsFalse",
|
|
"optional": false
|
|
}
|
|
}
|
|
],
|
|
"selfClosing": true,
|
|
"typeArguments": null
|
|
},
|
|
"children": [],
|
|
"closing": null
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 499,
|
|
"end": 577,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "const",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 505,
|
|
"end": 576,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 505,
|
|
"end": 518,
|
|
"ctxt": 0
|
|
},
|
|
"value": "textPropsTrue",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 518,
|
|
"end": 529,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsTypeReference",
|
|
"span": {
|
|
"start": 520,
|
|
"end": 529,
|
|
"ctxt": 0
|
|
},
|
|
"typeName": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 520,
|
|
"end": 529,
|
|
"ctxt": 0
|
|
},
|
|
"value": "TextProps",
|
|
"optional": false
|
|
},
|
|
"typeParams": null
|
|
}
|
|
}
|
|
},
|
|
"init": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 532,
|
|
"end": 576,
|
|
"ctxt": 0
|
|
},
|
|
"properties": [
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 538,
|
|
"end": 546,
|
|
"ctxt": 0
|
|
},
|
|
"value": "editable",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "BooleanLiteral",
|
|
"span": {
|
|
"start": 548,
|
|
"end": 552,
|
|
"ctxt": 0
|
|
},
|
|
"value": true
|
|
}
|
|
},
|
|
{
|
|
"type": "KeyValueProperty",
|
|
"key": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 558,
|
|
"end": 564,
|
|
"ctxt": 0
|
|
},
|
|
"value": "onEdit",
|
|
"optional": false
|
|
},
|
|
"value": {
|
|
"type": "ArrowFunctionExpression",
|
|
"span": {
|
|
"start": 566,
|
|
"end": 574,
|
|
"ctxt": 0
|
|
},
|
|
"params": [],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 572,
|
|
"end": 574,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": []
|
|
},
|
|
"async": false,
|
|
"generator": false,
|
|
"typeParameters": null,
|
|
"returnType": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 579,
|
|
"end": 624,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 583,
|
|
"end": 624,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 583,
|
|
"end": 585,
|
|
"ctxt": 0
|
|
},
|
|
"value": "y2",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "JSXElement",
|
|
"span": {
|
|
"start": 588,
|
|
"end": 624,
|
|
"ctxt": 0
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningElement",
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 589,
|
|
"end": 602,
|
|
"ctxt": 0
|
|
},
|
|
"value": "TextComponent",
|
|
"optional": false
|
|
},
|
|
"span": {
|
|
"start": 588,
|
|
"end": 624,
|
|
"ctxt": 0
|
|
},
|
|
"attributes": [
|
|
{
|
|
"type": "SpreadElement",
|
|
"spread": {
|
|
"start": 604,
|
|
"end": 607,
|
|
"ctxt": 0
|
|
},
|
|
"arguments": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 607,
|
|
"end": 620,
|
|
"ctxt": 0
|
|
},
|
|
"value": "textPropsTrue",
|
|
"optional": false
|
|
}
|
|
}
|
|
],
|
|
"selfClosing": true,
|
|
"typeArguments": null
|
|
},
|
|
"children": [],
|
|
"closing": null
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|