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

640 lines
15 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 109,
"end": 444,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 109,
"end": 132,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 109,
"end": 132,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 109,
"end": 127,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 109,
"end": 116,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 117,
"end": 127,
"ctxt": 0
},
"value": "formatters",
"optional": false
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 130,
"end": 132,
"ctxt": 0
},
"properties": []
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 156,
"end": 182,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 156,
"end": 182,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 156,
"end": 163,
"ctxt": 0
},
"value": "exports",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "CallExpression",
"span": {
"start": 166,
"end": 182,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 166,
"end": 173,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 174,
"end": 181,
"ctxt": 0
},
"value": "./mod",
"raw": "'./mod'"
}
}
],
"typeArguments": null
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 183,
"end": 235,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 183,
"end": 235,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 183,
"end": 203,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 183,
"end": 201,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 183,
"end": 190,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 191,
"end": 201,
"ctxt": 0
},
"value": "formatters",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 202,
"end": 203,
"ctxt": 0
},
"value": "j",
"optional": false
}
},
"right": {
"type": "FunctionExpression",
"identifier": null,
"params": [
{
"type": "Parameter",
"span": {
"start": 216,
"end": 217,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 216,
"end": 217,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 206,
"end": 235,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 219,
"end": 235,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 225,
"end": 233,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 232,
"end": 233,
"ctxt": 0
},
"value": "v",
"optional": false
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 260,
"end": 286,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 260,
"end": 286,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 260,
"end": 267,
"ctxt": 0
},
"value": "exports",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "CallExpression",
"span": {
"start": 270,
"end": 286,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 270,
"end": 277,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 278,
"end": 285,
"ctxt": 0
},
"value": "./mod",
"raw": "'./mod'"
}
}
],
"typeArguments": null
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 287,
"end": 339,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 287,
"end": 339,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 287,
"end": 307,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 287,
"end": 305,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 287,
"end": 294,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 295,
"end": 305,
"ctxt": 0
},
"value": "formatters",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 306,
"end": 307,
"ctxt": 0
},
"value": "o",
"optional": false
}
},
"right": {
"type": "FunctionExpression",
"identifier": null,
"params": [
{
"type": "Parameter",
"span": {
"start": 320,
"end": 321,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 320,
"end": 321,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 310,
"end": 339,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 323,
"end": 339,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 329,
"end": 337,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 336,
"end": 337,
"ctxt": 0
},
"value": "v",
"optional": false
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 362,
"end": 392,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 369,
"end": 379,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 374,
"end": 379,
"ctxt": 0
},
"value": "debug",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 385,
"end": 392,
"ctxt": 0
},
"value": "./mod",
"raw": "'./mod'"
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 394,
"end": 412,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 394,
"end": 412,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 394,
"end": 410,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 394,
"end": 399,
"ctxt": 0
},
"value": "debug",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 400,
"end": 410,
"ctxt": 0
},
"value": "formatters",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 411,
"end": 412,
"ctxt": 0
},
"value": "j",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 413,
"end": 444,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 417,
"end": 444,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 417,
"end": 420,
"ctxt": 0
},
"value": "one",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 423,
"end": 444,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 423,
"end": 441,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 423,
"end": 439,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 423,
"end": 428,
"ctxt": 0
},
"value": "debug",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 429,
"end": 439,
"ctxt": 0
},
"value": "formatters",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 440,
"end": 441,
"ctxt": 0
},
"value": "o",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 442,
"end": 443,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
],
"interpreter": null
}