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

246 lines
5.8 KiB
JSON

{
"type": "Script",
"span": {
"start": 50,
"end": 189,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 64,
"end": 70,
"ctxt": 0
},
"value": "Animal",
"optional": false
},
"declare": true,
"span": {
"start": 50,
"end": 125,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 77,
"end": 96,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 81,
"end": 86,
"ctxt": 0
},
"value": "sound",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 77,
"end": 96,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 88,
"end": 96,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 90,
"end": 96,
"ctxt": 0
},
"kind": "string"
}
}
},
"kind": "getter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 101,
"end": 123,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 105,
"end": 110,
"ctxt": 0
},
"value": "sound",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 111,
"end": 122,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 111,
"end": 122,
"ctxt": 0
},
"value": "val",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 114,
"end": 122,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 116,
"end": 122,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 101,
"end": 123,
"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": 132,
"end": 136,
"ctxt": 0
},
"value": "Lion",
"optional": false
},
"declare": false,
"span": {
"start": 126,
"end": 189,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 158,
"end": 173,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 158,
"end": 163,
"ctxt": 0
},
"value": "sound",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 166,
"end": 173,
"ctxt": 0
},
"value": "RAWR!",
"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
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 145,
"end": 151,
"ctxt": 0
},
"value": "Animal",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}