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

343 lines
8.6 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 15,
"end": 165,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 15,
"end": 73,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 25,
"end": 27,
"ctxt": 0
},
"value": "I1",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 28,
"end": 73,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 34,
"end": 71,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "MemberExpression",
"span": {
"start": 35,
"end": 53,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 35,
"end": 41,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 42,
"end": 53,
"ctxt": 0
},
"value": "toStringTag",
"optional": false
}
},
"computed": true,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 56,
"end": 71,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 58,
"end": 71,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 60,
"end": 69,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 60,
"end": 61,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 61,
"end": 69,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 63,
"end": 69,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 74,
"end": 132,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 84,
"end": 86,
"ctxt": 0
},
"value": "I2",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 87,
"end": 132,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 93,
"end": 130,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "MemberExpression",
"span": {
"start": 94,
"end": 112,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 94,
"end": 100,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 101,
"end": 112,
"ctxt": 0
},
"value": "toStringTag",
"optional": false
}
},
"computed": true,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 115,
"end": 130,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 117,
"end": 130,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 119,
"end": 128,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 119,
"end": 120,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 120,
"end": 128,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 122,
"end": 128,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
}
]
}
},
"typeParams": null
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 134,
"end": 165,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 144,
"end": 146,
"ctxt": 0
},
"value": "I3",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [
{
"type": "TsExpressionWithTypeArguments",
"span": {
"start": 155,
"end": 157,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 155,
"end": 157,
"ctxt": 0
},
"value": "I1",
"optional": false
},
"typeArguments": null
},
{
"type": "TsExpressionWithTypeArguments",
"span": {
"start": 159,
"end": 161,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 159,
"end": 161,
"ctxt": 0
},
"value": "I2",
"optional": false
},
"typeArguments": null
}
],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 162,
"end": 165,
"ctxt": 0
},
"body": []
}
}
],
"interpreter": null
}