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

409 lines
10 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 114,
"end": 352,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 114,
"end": 191,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 114,
"end": 191,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 114,
"end": 128,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 114,
"end": 120,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 121,
"end": 128,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "ClassExpression",
"identifier": {
"type": "Identifier",
"span": {
"start": 137,
"end": 140,
"ctxt": 0
},
"value": "Obj",
"optional": false
},
"span": {
"start": 131,
"end": 191,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 147,
"end": 189,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 147,
"end": 158,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 161,
"end": 189,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 171,
"end": 183,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 171,
"end": 182,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 171,
"end": 177,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 171,
"end": 175,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 176,
"end": 177,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 180,
"end": 182,
"ctxt": 0
},
"value": 12.0,
"raw": "12"
}
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 215,
"end": 244,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 221,
"end": 243,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 221,
"end": 224,
"ctxt": 0
},
"value": "Obj",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 227,
"end": 243,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 227,
"end": 234,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 235,
"end": 242,
"ctxt": 0
},
"value": "./obj",
"raw": "\"./obj\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 252,
"end": 261,
"ctxt": 0
},
"value": "Container",
"optional": false
},
"declare": false,
"span": {
"start": 246,
"end": 323,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 268,
"end": 321,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 268,
"end": 279,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 282,
"end": 321,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 292,
"end": 315,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 292,
"end": 314,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 292,
"end": 302,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 292,
"end": 296,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 297,
"end": 302,
"ctxt": 0
},
"value": "usage",
"optional": false
}
},
"right": {
"type": "NewExpression",
"span": {
"start": 305,
"end": 314,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 309,
"end": 312,
"ctxt": 0
},
"value": "Obj",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ExpressionStatement",
"span": {
"start": 325,
"end": 352,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 325,
"end": 351,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 325,
"end": 339,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 325,
"end": 331,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 332,
"end": 339,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 342,
"end": 351,
"ctxt": 0
},
"value": "Container",
"optional": false
}
}
}
],
"interpreter": null
}