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

378 lines
7.8 KiB
JSON

{
"type": "Module",
"span": {
"start": 122,
"end": 288,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 122,
"end": 141,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 129,
"end": 141,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 135,
"end": 140,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 135,
"end": 136,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 139,
"end": 140,
"ctxt": 0
},
"value": 1.0
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 142,
"end": 161,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 149,
"end": 161,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 155,
"end": 160,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 155,
"end": 156,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 159,
"end": 160,
"ctxt": 0
},
"value": 2.0
},
"definite": false
}
]
}
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 182,
"end": 208,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportNamespaceSpecifier",
"span": {
"start": 189,
"end": 196,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 194,
"end": 196,
"ctxt": 0
},
"value": "ns",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 202,
"end": 207,
"ctxt": 0
},
"value": "./0",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 209,
"end": 214,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 209,
"end": 213,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 209,
"end": 211,
"ctxt": 0
},
"value": "ns",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 212,
"end": 213,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 215,
"end": 220,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 215,
"end": 219,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 215,
"end": 217,
"ctxt": 0
},
"value": "ns",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 218,
"end": 219,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 241,
"end": 267,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 248,
"end": 256,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 253,
"end": 256,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 262,
"end": 267,
"ctxt": 0
},
"value": "./1",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 269,
"end": 278,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 269,
"end": 277,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 269,
"end": 275,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 269,
"end": 272,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 273,
"end": 275,
"ctxt": 0
},
"value": "ns",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 276,
"end": 277,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 279,
"end": 288,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 279,
"end": 287,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 279,
"end": 285,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 279,
"end": 282,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 283,
"end": 285,
"ctxt": 0
},
"value": "ns",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 286,
"end": 287,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
}
],
"interpreter": null
}