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

737 lines
18 KiB
JSON

{
"type": "Module",
"span": {
"start": 75,
"end": 420,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 75,
"end": 90,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 75,
"end": 89,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 75,
"end": 84,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 75,
"end": 82,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 83,
"end": 84,
"ctxt": 0
},
"value": "n",
"optional": false
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 87,
"end": 89,
"ctxt": 0
},
"properties": []
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 91,
"end": 137,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 91,
"end": 137,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 91,
"end": 102,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 91,
"end": 100,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 91,
"end": 98,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 99,
"end": 100,
"ctxt": 0
},
"value": "n",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 101,
"end": 102,
"ctxt": 0
},
"value": "K",
"optional": false
}
},
"right": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 105,
"end": 137,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 117,
"end": 137,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 123,
"end": 135,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 123,
"end": 134,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 123,
"end": 129,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 123,
"end": 127,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 128,
"end": 129,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 132,
"end": 134,
"ctxt": 0
},
"value": 10.0
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 138,
"end": 210,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 138,
"end": 210,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 138,
"end": 153,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 138,
"end": 145,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 146,
"end": 153,
"ctxt": 0
},
"value": "Classic",
"optional": false
}
},
"right": {
"type": "ClassExpression",
"identifier": null,
"span": {
"start": 156,
"end": 210,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 168,
"end": 208,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 168,
"end": 179,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 182,
"end": 208,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 192,
"end": 202,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 192,
"end": 202,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 192,
"end": 198,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 192,
"end": 196,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 197,
"end": 198,
"ctxt": 0
},
"value": "p",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 201,
"end": 202,
"ctxt": 0
},
"value": 1.0
}
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 233,
"end": 259,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 240,
"end": 246,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 245,
"end": 246,
"ctxt": 0
},
"value": "s",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 252,
"end": 259,
"ctxt": 0
},
"value": "./mod",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 261,
"end": 280,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 265,
"end": 280,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 265,
"end": 266,
"ctxt": 0
},
"value": "k",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 269,
"end": 280,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 273,
"end": 278,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 273,
"end": 276,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 273,
"end": 274,
"ctxt": 0
},
"value": "s",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 275,
"end": 276,
"ctxt": 0
},
"value": "n",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 277,
"end": 278,
"ctxt": 0
},
"value": "K",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 281,
"end": 284,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 281,
"end": 284,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 281,
"end": 282,
"ctxt": 0
},
"value": "k",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 283,
"end": 284,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 285,
"end": 314,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 289,
"end": 314,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 289,
"end": 296,
"ctxt": 0
},
"value": "classic",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NewExpression",
"span": {
"start": 299,
"end": 314,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 303,
"end": 312,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 303,
"end": 304,
"ctxt": 0
},
"value": "s",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 305,
"end": 312,
"ctxt": 0
},
"value": "Classic",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 381,
"end": 382,
"ctxt": 0
},
"value": "f",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 383,
"end": 384,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 383,
"end": 384,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": null
}
},
{
"type": "Parameter",
"span": {
"start": 386,
"end": 393,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 386,
"end": 393,
"ctxt": 0
},
"value": "classic",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 372,
"end": 420,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 395,
"end": 420,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 401,
"end": 404,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 401,
"end": 404,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 401,
"end": 402,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 403,
"end": 404,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 409,
"end": 418,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 409,
"end": 418,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 409,
"end": 416,
"ctxt": 0
},
"value": "classic",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 417,
"end": 418,
"ctxt": 0
},
"value": "p",
"optional": false
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}