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

335 lines
8.2 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 15,
"end": 175,
"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": 175,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 29,
"end": 51,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 29,
"end": 46,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 30,
"end": 45,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 30,
"end": 36,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 37,
"end": 45,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 49,
"end": 50,
"ctxt": 0
},
"value": 0.0
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 56,
"end": 85,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 56,
"end": 76,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 57,
"end": 75,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 57,
"end": 63,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 64,
"end": 75,
"ctxt": 0
},
"value": "unscopables",
"optional": false
}
}
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 76,
"end": 84,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 78,
"end": 84,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 90,
"end": 116,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 90,
"end": 110,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 91,
"end": 109,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 91,
"end": 97,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 98,
"end": 109,
"ctxt": 0
},
"value": "toPrimitive",
"optional": false
}
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 90,
"end": 116,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 113,
"end": 116,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 121,
"end": 173,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 125,
"end": 145,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 126,
"end": 144,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 126,
"end": 132,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 133,
"end": 144,
"ctxt": 0
},
"value": "toStringTag",
"optional": false
}
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 121,
"end": 173,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 148,
"end": 173,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 158,
"end": 167,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 165,
"end": 166,
"ctxt": 0
},
"value": 0.0
}
}
]
},
"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
}