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

355 lines
10 KiB
JSON

{
"type": "Module",
"span": {
"start": 173,
"end": 358,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 173,
"end": 200,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 179,
"end": 199,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 179,
"end": 183,
"ctxt": 0
},
"value": "_sym",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "StringLiteral",
"span": {
"start": 186,
"end": 199,
"ctxt": 0
},
"value": "my-fake-sym",
"raw": "\"my-fake-sym\""
},
"definite": false
}
]
},
{
"type": "ExportDeclaration",
"span": {
"start": 201,
"end": 358,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 214,
"end": 221,
"ctxt": 0
},
"value": "MyClass",
"optional": false
},
"declare": false,
"span": {
"start": 208,
"end": 358,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 228,
"end": 276,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 228,
"end": 239,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 242,
"end": 276,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 252,
"end": 270,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 252,
"end": 269,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 252,
"end": 262,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 252,
"end": 256,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 256,
"end": 262,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 257,
"end": 261,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 265,
"end": 269,
"ctxt": 0
},
"value": "ok",
"raw": "\"ok\""
}
}
}
]
},
"accessibility": null,
"isOptional": false
},
{
"type": "ClassMethod",
"span": {
"start": 282,
"end": 356,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 282,
"end": 288,
"ctxt": 0
},
"value": "method",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 282,
"end": 356,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 291,
"end": 356,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 301,
"end": 320,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 301,
"end": 319,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 301,
"end": 311,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 301,
"end": 305,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 305,
"end": 311,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 306,
"end": 310,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 314,
"end": 319,
"ctxt": 0
},
"value": "yep",
"raw": "\"yep\""
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 329,
"end": 350,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 335,
"end": 349,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 335,
"end": 336,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 339,
"end": 349,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 339,
"end": 343,
"ctxt": 0
}
},
"property": {
"type": "Computed",
"span": {
"start": 343,
"end": 349,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 344,
"end": 348,
"ctxt": 0
},
"value": "_sym",
"optional": false
}
}
},
"definite": false
}
]
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
}
],
"interpreter": null
}