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

301 lines
8.0 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 0,
"end": 122,
"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": 122,
"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": 122,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 79,
"end": 120,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 79,
"end": 80,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 80,
"end": 119,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 82,
"end": 119,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 92,
"end": 102,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 92,
"end": 93,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 93,
"end": 101,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 95,
"end": 101,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 103,
"end": 113,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 103,
"end": 104,
"ctxt": 0
},
"value": "b",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 104,
"end": 112,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 106,
"end": 112,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
}
]
}
},
"typeParams": null
}
]
}
}
],
"interpreter": null
}