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

372 lines
7.7 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 97,
"end": 263,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 97,
"end": 116,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 104,
"end": 116,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 110,
"end": 115,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 110,
"end": 111,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 114,
"end": 115,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 117,
"end": 136,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 124,
"end": 136,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 130,
"end": 135,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 130,
"end": 131,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 134,
"end": 135,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
},
"definite": false
}
]
}
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 157,
"end": 183,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportNamespaceSpecifier",
"span": {
"start": 164,
"end": 171,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 169,
"end": 171,
"ctxt": 0
},
"value": "ns",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 177,
"end": 182,
"ctxt": 0
},
"value": "./0",
"raw": "'./0'"
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 184,
"end": 189,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 184,
"end": 188,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 184,
"end": 186,
"ctxt": 0
},
"value": "ns",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 187,
"end": 188,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 190,
"end": 195,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 190,
"end": 194,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 190,
"end": 192,
"ctxt": 0
},
"value": "ns",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 193,
"end": 194,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 216,
"end": 242,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 223,
"end": 231,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 228,
"end": 231,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 237,
"end": 242,
"ctxt": 0
},
"value": "./1",
"raw": "'./1'"
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 244,
"end": 253,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 244,
"end": 252,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 244,
"end": 250,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 244,
"end": 247,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 248,
"end": 250,
"ctxt": 0
},
"value": "ns",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 251,
"end": 252,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 254,
"end": 263,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 254,
"end": 262,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 254,
"end": 260,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 254,
"end": 257,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 258,
"end": 260,
"ctxt": 0
},
"value": "ns",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 261,
"end": 262,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
}
],
"interpreter": null
}