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

468 lines
12 KiB
JSON

{
"type": "Script",
"span": {
"start": 53,
"end": 278,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 59,
"end": 63,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"declare": false,
"span": {
"start": 53,
"end": 76,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 68,
"end": 74,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 68,
"end": 69,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 72,
"end": 73,
"ctxt": 0
},
"value": 1.0
},
"typeAnnotation": 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": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 84,
"end": 91,
"ctxt": 0
},
"value": "Derived",
"optional": false
},
"declare": false,
"span": {
"start": 78,
"end": 211,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 109,
"end": 130,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 113,
"end": 114,
"ctxt": 0
},
"value": "x",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 109,
"end": 130,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 117,
"end": 130,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 119,
"end": 128,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 126,
"end": 127,
"ctxt": 0
},
"value": 2.0
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "getter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 155,
"end": 209,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 159,
"end": 160,
"ctxt": 0
},
"value": "x",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 161,
"end": 166,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 161,
"end": 166,
"ctxt": 0
},
"value": "value",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 155,
"end": 209,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 168,
"end": 209,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 170,
"end": 207,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 170,
"end": 206,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 170,
"end": 181,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 170,
"end": 177,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 178,
"end": 181,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "TemplateLiteral",
"span": {
"start": 182,
"end": 205,
"ctxt": 0
},
"expressions": [
{
"type": "Identifier",
"span": {
"start": 198,
"end": 203,
"ctxt": 0
},
"value": "value",
"optional": false
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 183,
"end": 196,
"ctxt": 0
},
"tail": false,
"cooked": "x was set to ",
"raw": "x was set to "
},
{
"type": "TemplateElement",
"span": {
"start": 204,
"end": 204,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
}
}
],
"typeArguments": null
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "setter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 100,
"end": 104,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "VariableDeclaration",
"span": {
"start": 213,
"end": 239,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 219,
"end": 238,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 219,
"end": 222,
"ctxt": 0
},
"value": "obj",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 225,
"end": 238,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 229,
"end": 236,
"ctxt": 0
},
"value": "Derived",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 259,
"end": 278,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 259,
"end": 277,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 259,
"end": 270,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 259,
"end": 266,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 267,
"end": 270,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 271,
"end": 276,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 271,
"end": 274,
"ctxt": 0
},
"value": "obj",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 275,
"end": 276,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
}
],
"typeArguments": null
}
}
],
"interpreter": null
}