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

221 lines
5.6 KiB
JSON

{
"type": "Script",
"span": {
"start": 15,
"end": 109,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 15,
"end": 30,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 19,
"end": 29,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 19,
"end": 20,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 23,
"end": 29,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 31,
"end": 109,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 35,
"end": 109,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 35,
"end": 36,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 39,
"end": 109,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Computed",
"span": {
"start": 45,
"end": 48,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 46,
"end": 47,
"ctxt": 0
},
"value": "s",
"optional": false
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 50,
"end": 51,
"ctxt": 0
},
"value": 0.0
}
},
{
"type": "MethodProperty",
"key": {
"type": "Computed",
"span": {
"start": 57,
"end": 60,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 58,
"end": 59,
"ctxt": 0
},
"value": "s",
"optional": false
}
},
"params": [],
"decorators": [],
"span": {
"start": 57,
"end": 66,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 63,
"end": 66,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "GetterProperty",
"span": {
"start": 72,
"end": 107,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 76,
"end": 79,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 77,
"end": 78,
"ctxt": 0
},
"value": "s",
"optional": false
}
},
"typeAnnotation": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 82,
"end": 107,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 92,
"end": 101,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 99,
"end": 100,
"ctxt": 0
},
"value": 0.0
}
}
]
}
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}