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

100 lines
2.2 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 27,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 0,
"end": 27,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 10,
"end": 11,
"ctxt": 0
},
"value": "I",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 12,
"end": 27,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 16,
"end": 25,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "StringLiteral",
"span": {
"start": 16,
"end": 19,
"ctxt": 0
},
"value": "G",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": null,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 19,
"end": 22,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 20,
"end": 21,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 20,
"end": 21,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
}
}
]
}
}
],
"interpreter": null
}