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

83 lines
1.8 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 29,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 1,
"end": 29,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 11,
"end": 12,
"ctxt": 0
},
"value": "I",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 13,
"end": 29,
"ctxt": 0
},
"body": [
{
"type": "TsIndexSignature",
"params": [
{
"type": "Identifier",
"span": {
"start": 18,
"end": 26,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 19,
"end": 26,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 20,
"end": 26,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": null,
"readonly": false,
"static": false,
"span": {
"start": 17,
"end": 27,
"ctxt": 0
}
}
]
}
}
],
"interpreter": null
}