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

382 lines
8.8 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 1,
"end": 264,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 7,
"end": 11,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"declare": false,
"span": {
"start": 1,
"end": 40,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 19,
"end": 28,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 20,
"end": 28,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 22,
"end": 28,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 29,
"end": 37,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 31,
"end": 37,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 31,
"end": 37,
"ctxt": 0
},
"value": "Object",
"optional": false
},
"typeParams": null
}
},
"readonly": false,
"static": false,
"span": {
"start": 18,
"end": 38,
"ctxt": 0
}
}
],
"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": 130,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 112,
"end": 121,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 113,
"end": 121,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 115,
"end": 121,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 122,
"end": 127,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 124,
"end": 127,
"ctxt": 0
},
"kind": "any"
}
},
"readonly": false,
"static": false,
"span": {
"start": 111,
"end": 128,
"ctxt": 0
}
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 100,
"end": 104,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 138,
"end": 143,
"ctxt": 0
},
"value": "Base2",
"optional": false
},
"declare": false,
"span": {
"start": 132,
"end": 172,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 151,
"end": 160,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 152,
"end": 160,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 154,
"end": 160,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 161,
"end": 169,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 163,
"end": 169,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 163,
"end": 169,
"ctxt": 0
},
"value": "Object",
"optional": false
},
"typeParams": null
}
},
"readonly": false,
"static": false,
"span": {
"start": 150,
"end": 170,
"ctxt": 0
}
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 216,
"end": 224,
"ctxt": 0
},
"value": "Derived2",
"optional": false
},
"declare": false,
"span": {
"start": 210,
"end": 264,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 246,
"end": 255,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 247,
"end": 255,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 249,
"end": 255,
"ctxt": 0
},
"kind": "number"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 256,
"end": 261,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 258,
"end": 261,
"ctxt": 0
},
"kind": "any"
}
},
"readonly": false,
"static": false,
"span": {
"start": 245,
"end": 262,
"ctxt": 0
}
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 233,
"end": 238,
"ctxt": 0
},
"value": "Base2",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}