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

422 lines
9.5 KiB
JSON

{
"type": "Script",
"span": {
"start": 113,
"end": 323,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 119,
"end": 122,
"ctxt": 0
},
"value": "Bar",
"optional": false
},
"declare": false,
"span": {
"start": 113,
"end": 125,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ExpressionStatement",
"span": {
"start": 126,
"end": 147,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 126,
"end": 146,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 126,
"end": 140,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 126,
"end": 132,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 133,
"end": 140,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 143,
"end": 146,
"ctxt": 0
},
"value": "Bar",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 169,
"end": 198,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 175,
"end": 197,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 175,
"end": 178,
"ctxt": 0
},
"value": "Bar",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 181,
"end": 197,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 181,
"end": 188,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 189,
"end": 196,
"ctxt": 0
},
"value": "./bar",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 199,
"end": 242,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 205,
"end": 241,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 205,
"end": 212,
"ctxt": 0
},
"value": "Strings",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 215,
"end": 241,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 221,
"end": 222,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 224,
"end": 227,
"ctxt": 0
},
"value": "A",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 233,
"end": 234,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 236,
"end": 239,
"ctxt": 0
},
"value": "B",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
},
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 249,
"end": 252,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"declare": false,
"span": {
"start": 243,
"end": 267,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": {
"type": "Identifier",
"span": {
"start": 261,
"end": 264,
"ctxt": 0
},
"value": "Bar",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ExpressionStatement",
"span": {
"start": 268,
"end": 289,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 268,
"end": 288,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 268,
"end": 282,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 268,
"end": 274,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 275,
"end": 282,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 285,
"end": 288,
"ctxt": 0
},
"value": "Foo",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 290,
"end": 323,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 290,
"end": 322,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 290,
"end": 312,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 290,
"end": 304,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 290,
"end": 296,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 297,
"end": 304,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 305,
"end": 312,
"ctxt": 0
},
"value": "Strings",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 315,
"end": 322,
"ctxt": 0
},
"value": "Strings",
"optional": false
}
}
}
],
"interpreter": null
}