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

99 lines
2.2 KiB
JSON
Raw Normal View History

{
"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": "TsMethodSignature",
"span": {
"start": 17,
"end": 27,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "StringLiteral",
"span": {
"start": 17,
"end": 20,
"ctxt": 0
},
"value": "H",
"raw": "\"H\""
},
"computed": false,
"optional": true,
"params": [],
"typeAnn": null,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 21,
"end": 24,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 22,
"end": 23,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 22,
"end": 23,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": null,
"default": null
}
]
}
}
]
}
}
],
"interpreter": null
}