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

221 lines
5.4 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 15,
"end": 142,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 21,
"end": 22,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 15,
"end": 142,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 29,
"end": 82,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 33,
"end": 53,
"ctxt": 0
},
"expression": {
"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": "hasInstance",
"optional": false
}
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 29,
"end": 82,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 56,
"end": 82,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 66,
"end": 76,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 73,
"end": 75,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "getter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 87,
"end": 140,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 91,
"end": 111,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 92,
"end": 110,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 92,
"end": 98,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 99,
"end": 110,
"ctxt": 0
},
"value": "toPrimitive",
"optional": false
}
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 87,
"end": 140,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 114,
"end": 140,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 124,
"end": 134,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 131,
"end": 133,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "getter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}