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

175 lines
4.1 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 15,
"end": 98,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 15,
"end": 63,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 25,
"end": 42,
"ctxt": 0
},
"value": "SymbolConstructor",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 43,
"end": 63,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 49,
"end": 61,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 49,
"end": 52,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 52,
"end": 60,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 54,
"end": 60,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 65,
"end": 98,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 69,
"end": 98,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 69,
"end": 72,
"ctxt": 0
},
"value": "obj",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 75,
"end": 98,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Computed",
"span": {
"start": 81,
"end": 93,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 82,
"end": 92,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 82,
"end": 88,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 89,
"end": 92,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 95,
"end": 96,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}