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

120 lines
3.2 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 16,
"end": 61,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 16,
"end": 61,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 20,
"end": 61,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 20,
"end": 21,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 21,
"end": 61,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 23,
"end": 61,
"ctxt": 0
},
"members": [
{
"type": "TsMethodSignature",
"span": {
"start": 29,
"end": 59,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "MemberExpression",
"span": {
"start": 30,
"end": 48,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 30,
"end": 36,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 37,
"end": 48,
"ctxt": 0
},
"value": "toPrimitive",
"optional": false
}
},
"computed": true,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 51,
"end": 59,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 53,
"end": 59,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
}
],
"interpreter": null
}