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

140 lines
3.1 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 56,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 7,
"end": 8,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 1,
"end": 56,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 15,
"end": 24,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 16,
"end": 24,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 18,
"end": 24,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 25,
"end": 33,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 27,
"end": 33,
"ctxt": 0
},
"kind": "number"
}
},
"readonly": false,
"static": false,
"span": {
"start": 14,
"end": 34,
"ctxt": 0
}
},
{
"type": "ClassProperty",
"span": {
"start": 38,
"end": 54,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 45,
"end": 46,
"ctxt": 0
},
"value": "v",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 46,
"end": 54,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 48,
"end": 54,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": "public",
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}