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

372 lines
7.7 KiB
JSON

{
"type": "Module",
"span": {
"start": 123,
"end": 289,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 123,
"end": 142,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 130,
"end": 142,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 136,
"end": 141,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 136,
"end": 137,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 140,
"end": 141,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 143,
"end": 162,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 150,
"end": 162,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 156,
"end": 161,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 156,
"end": 157,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 160,
"end": 161,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
},
"definite": false
}
]
}
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 183,
"end": 209,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportNamespaceSpecifier",
"span": {
"start": 190,
"end": 197,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 195,
"end": 197,
"ctxt": 0
},
"value": "ns",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 203,
"end": 208,
"ctxt": 0
},
"value": "./0",
"raw": "'./0'"
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 210,
"end": 215,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 210,
"end": 214,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 210,
"end": 212,
"ctxt": 0
},
"value": "ns",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 213,
"end": 214,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 216,
"end": 221,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 216,
"end": 220,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 216,
"end": 218,
"ctxt": 0
},
"value": "ns",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 219,
"end": 220,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 242,
"end": 268,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 249,
"end": 257,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 254,
"end": 257,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 263,
"end": 268,
"ctxt": 0
},
"value": "./1",
"raw": "'./1'"
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 270,
"end": 279,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 270,
"end": 278,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 270,
"end": 276,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 270,
"end": 273,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 274,
"end": 276,
"ctxt": 0
},
"value": "ns",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 277,
"end": 278,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 280,
"end": 289,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 280,
"end": 288,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 280,
"end": 286,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 280,
"end": 283,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 284,
"end": 286,
"ctxt": 0
},
"value": "ns",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 287,
"end": 288,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
}
],
"interpreter": null
}