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

284 lines
6.2 KiB
JSON

{
"type": "Module",
"span": {
"start": 128,
"end": 302,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 128,
"end": 160,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 134,
"end": 159,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 134,
"end": 135,
"ctxt": 0
},
"value": "m",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 138,
"end": 159,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 138,
"end": 145,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 146,
"end": 158,
"ctxt": 0
},
"value": "./exporter",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 162,
"end": 189,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 162,
"end": 188,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 162,
"end": 176,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 162,
"end": 168,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 169,
"end": 176,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "MemberExpression",
"span": {
"start": 179,
"end": 188,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 179,
"end": 180,
"ctxt": 0
},
"value": "m",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 181,
"end": 188,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 190,
"end": 226,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 190,
"end": 225,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 190,
"end": 215,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 190,
"end": 204,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 190,
"end": 196,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 197,
"end": 204,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 205,
"end": 215,
"ctxt": 0
},
"value": "memberName",
"optional": false
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 218,
"end": 225,
"ctxt": 0
},
"value": "thing",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 263,
"end": 271,
"ctxt": 0
},
"value": "validate",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 254,
"end": 276,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 274,
"end": 276,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ExportDefaultExpression",
"span": {
"start": 278,
"end": 302,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 293,
"end": 301,
"ctxt": 0
},
"value": "validate",
"optional": false
}
}
],
"interpreter": null
}