swc/crates/swc_ecma_parser/tests/tsc/exportAsNamespace3.json
2022-04-05 12:46:35 +00:00

532 lines
11 KiB
JSON

{
"type": "Module",
"span": {
"start": 122,
"end": 322,
"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,
"raw": "1"
},
"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,
"raw": "2"
},
"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",
"raw": "'./0'"
},
"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": "VariableDeclaration",
"span": {
"start": 221,
"end": 242,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 225,
"end": 242,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 225,
"end": 227,
"ctxt": 0
},
"value": "ns",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 230,
"end": 242,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 231,
"end": 232,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 234,
"end": 235,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 237,
"end": 238,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 240,
"end": 241,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
]
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 243,
"end": 248,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 243,
"end": 247,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 243,
"end": 245,
"ctxt": 0
},
"value": "ns",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 246,
"end": 247,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 249,
"end": 254,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 249,
"end": 253,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 249,
"end": 251,
"ctxt": 0
},
"value": "ns",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 252,
"end": 253,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 275,
"end": 301,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 282,
"end": 290,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 287,
"end": 290,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 296,
"end": 301,
"ctxt": 0
},
"value": "./1",
"raw": "'./1'"
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 303,
"end": 312,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 303,
"end": 311,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 303,
"end": 309,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 303,
"end": 306,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 307,
"end": 309,
"ctxt": 0
},
"value": "ns",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 310,
"end": 311,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 313,
"end": 322,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 313,
"end": 321,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 313,
"end": 319,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 313,
"end": 316,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 317,
"end": 319,
"ctxt": 0
},
"value": "ns",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 320,
"end": 321,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
}
],
"interpreter": null
}