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

427 lines
10 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 16,
"end": 147,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 22,
"end": 23,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 16,
"end": 65,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 30,
"end": 63,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 38,
"end": 55,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 39,
"end": 54,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 39,
"end": 45,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 46,
"end": 54,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 55,
"end": 62,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 57,
"end": 62,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 59,
"end": 60,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 59,
"end": 60,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": null,
"typeParams": null
}
]
}
},
"isStatic": false,
"decorators": [],
"accessibility": "private",
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 66,
"end": 111,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 76,
"end": 77,
"ctxt": 0
},
"value": "I",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 78,
"end": 111,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 84,
"end": 109,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "MemberExpression",
"span": {
"start": 85,
"end": 100,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 85,
"end": 91,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 92,
"end": 100,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
},
"computed": true,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 101,
"end": 108,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 103,
"end": 108,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 105,
"end": 106,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 105,
"end": 106,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": null,
"typeParams": null
}
]
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 113,
"end": 122,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 117,
"end": 121,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 117,
"end": 118,
"ctxt": 0
},
"value": "i",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 118,
"end": 121,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 120,
"end": 121,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 120,
"end": 121,
"ctxt": 0
},
"value": "I",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 123,
"end": 133,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 123,
"end": 132,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 123,
"end": 124,
"ctxt": 0
},
"value": "i",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "NewExpression",
"span": {
"start": 127,
"end": 132,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 131,
"end": 132,
"ctxt": 0
},
"value": "C",
"optional": false
},
"arguments": null,
"typeArguments": null
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 134,
"end": 147,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 138,
"end": 146,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 138,
"end": 139,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 139,
"end": 142,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 141,
"end": 142,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 141,
"end": 142,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 145,
"end": 146,
"ctxt": 0
},
"value": "i",
"optional": false
},
"definite": false
}
]
}
],
"interpreter": null
}