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

84 lines
1.7 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 25,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 0,
"end": 25,
"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": 25,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 16,
"end": 23,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 16,
"end": 17,
"ctxt": 0
},
"value": "D",
"optional": false
},
"computed": false,
"optional": true,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 18,
"end": 22,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 19,
"end": 22,
"ctxt": 0
},
"kind": "any"
}
},
"typeParams": null
}
]
}
}
],
"interpreter": null
}