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

242 lines
5.6 KiB
JSON

{
"type": "Script",
"span": {
"start": 51,
"end": 190,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 65,
"end": 71,
"ctxt": 0
},
"value": "Animal",
"optional": false
},
"declare": true,
"span": {
"start": 51,
"end": 126,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 78,
"end": 97,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 82,
"end": 87,
"ctxt": 0
},
"value": "sound",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 78,
"end": 97,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 89,
"end": 97,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 91,
"end": 97,
"ctxt": 0
},
"kind": "string"
}
}
},
"kind": "getter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 102,
"end": 124,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 106,
"end": 111,
"ctxt": 0
},
"value": "sound",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 112,
"end": 123,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 112,
"end": 123,
"ctxt": 0
},
"value": "val",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 115,
"end": 123,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 117,
"end": 123,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 102,
"end": 124,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "setter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 133,
"end": 137,
"ctxt": 0
},
"value": "Lion",
"optional": false
},
"declare": false,
"span": {
"start": 127,
"end": 190,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 159,
"end": 174,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 159,
"end": 164,
"ctxt": 0
},
"value": "sound",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 167,
"end": 174,
"ctxt": 0
},
"value": "RAWR!",
"raw": "'RAWR!'"
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 146,
"end": 152,
"ctxt": 0
},
"value": "Animal",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}