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

260 lines
6.6 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 120,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 0,
"end": 40,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 10,
"end": 14,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 15,
"end": 40,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 21,
"end": 38,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 21,
"end": 22,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 22,
"end": 37,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 24,
"end": 37,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 26,
"end": 35,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 26,
"end": 27,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 27,
"end": 35,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 29,
"end": 35,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
}
]
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 42,
"end": 120,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 52,
"end": 59,
"ctxt": 0
},
"value": "Derived",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [
{
"type": "TsExpressionWithTypeArguments",
"span": {
"start": 68,
"end": 72,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 68,
"end": 72,
"ctxt": 0
},
"value": "Base",
"optional": false
},
"typeArguments": null
}
],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 73,
"end": 120,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 88,
"end": 118,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 88,
"end": 89,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 89,
"end": 117,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 91,
"end": 117,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 101,
"end": 111,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 101,
"end": 102,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 102,
"end": 110,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 104,
"end": 110,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
},
"typeParams": null
}
]
}
}
],
"interpreter": null
}