swc/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty3.json

364 lines
9.1 KiB
JSON

{
"type": "Script",
"span": {
"start": 53,
"end": 239,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 67,
"end": 73,
"ctxt": 0
},
"value": "Animal",
"optional": false
},
"declare": true,
"span": {
"start": 53,
"end": 95,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 80,
"end": 93,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 80,
"end": 85,
"ctxt": 0
},
"value": "sound",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 85,
"end": 93,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 87,
"end": 93,
"ctxt": 0
},
"kind": "string"
}
},
"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": 102,
"end": 106,
"ctxt": 0
},
"value": "Lion",
"optional": false
},
"declare": false,
"span": {
"start": 96,
"end": 239,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 128,
"end": 143,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 128,
"end": 134,
"ctxt": 0
},
"value": "_sound",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 137,
"end": 143,
"ctxt": 0
},
"value": "grrr",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 148,
"end": 182,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 152,
"end": 157,
"ctxt": 0
},
"value": "sound",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 148,
"end": 182,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 160,
"end": 182,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 162,
"end": 180,
"ctxt": 0
},
"argument": {
"type": "MemberExpression",
"span": {
"start": 169,
"end": 180,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 169,
"end": 173,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 174,
"end": 180,
"ctxt": 0
},
"value": "_sound",
"optional": false
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "getter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 201,
"end": 237,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 205,
"end": 210,
"ctxt": 0
},
"value": "sound",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 211,
"end": 214,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 211,
"end": 214,
"ctxt": 0
},
"value": "val",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 201,
"end": 237,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 216,
"end": 237,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 218,
"end": 235,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 218,
"end": 235,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 218,
"end": 229,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 218,
"end": 222,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 223,
"end": 229,
"ctxt": 0
},
"value": "_sound",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 232,
"end": 235,
"ctxt": 0
},
"value": "val",
"optional": false
}
}
}
]
},
"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": 115,
"end": 121,
"ctxt": 0
},
"value": "Animal",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}