swc/crates/swc_ecma_parser/tests/tsc/symbolProperty24.json
2022-03-22 07:54:08 +00:00

258 lines
6.1 KiB
JSON

{
"type": "Script",
"span": {
"start": 15,
"end": 151,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 15,
"end": 71,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 25,
"end": 26,
"ctxt": 0
},
"value": "I",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 27,
"end": 71,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 33,
"end": 69,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "MemberExpression",
"span": {
"start": 34,
"end": 52,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 34,
"end": 40,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 41,
"end": 52,
"ctxt": 0
},
"value": "toPrimitive",
"optional": false
}
},
"computed": true,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 53,
"end": 68,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 55,
"end": 68,
"ctxt": 0
},
"params": [],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 58,
"end": 68,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 61,
"end": 68,
"ctxt": 0
},
"kind": "boolean"
}
}
}
},
"typeParams": null
}
]
}
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 79,
"end": 80,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 73,
"end": 151,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 100,
"end": 149,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 100,
"end": 120,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 101,
"end": 119,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 101,
"end": 107,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 108,
"end": 119,
"ctxt": 0
},
"value": "toPrimitive",
"optional": false
}
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 100,
"end": 149,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 123,
"end": 149,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 133,
"end": 143,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 140,
"end": 142,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": [
{
"type": "TsExpressionWithTypeArguments",
"span": {
"start": 92,
"end": 93,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 92,
"end": 93,
"ctxt": 0
},
"value": "I",
"optional": false
},
"typeArguments": null
}
]
}
],
"interpreter": null
}