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

412 lines
10 KiB
JSON

{
"type": "Script",
"span": {
"start": 113,
"end": 351,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 113,
"end": 190,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 113,
"end": 190,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 113,
"end": 127,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 113,
"end": 119,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 120,
"end": 127,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "ClassExpression",
"identifier": {
"type": "Identifier",
"span": {
"start": 136,
"end": 139,
"ctxt": 0
},
"value": "Obj",
"optional": false
},
"span": {
"start": 130,
"end": 190,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 146,
"end": 188,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 146,
"end": 157,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 160,
"end": 188,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 170,
"end": 182,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 170,
"end": 181,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 170,
"end": 176,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 170,
"end": 174,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 175,
"end": 176,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 179,
"end": 181,
"ctxt": 0
},
"value": 12.0
}
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 214,
"end": 243,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 220,
"end": 242,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 220,
"end": 223,
"ctxt": 0
},
"value": "Obj",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 226,
"end": 242,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 226,
"end": 233,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 234,
"end": 241,
"ctxt": 0
},
"value": "./obj",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 251,
"end": 260,
"ctxt": 0
},
"value": "Container",
"optional": false
},
"declare": false,
"span": {
"start": 245,
"end": 322,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 267,
"end": 320,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 267,
"end": 278,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 281,
"end": 320,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 291,
"end": 314,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 291,
"end": 313,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 291,
"end": 301,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 291,
"end": 295,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 296,
"end": 301,
"ctxt": 0
},
"value": "usage",
"optional": false
}
},
"right": {
"type": "NewExpression",
"span": {
"start": 304,
"end": 313,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 308,
"end": 311,
"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": 324,
"end": 351,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 324,
"end": 350,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 324,
"end": 338,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 324,
"end": 330,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 331,
"end": 338,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 341,
"end": 350,
"ctxt": 0
},
"value": "Container",
"optional": false
}
}
}
],
"interpreter": null
}