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

434 lines
8.8 KiB
JSON

{
"type": "Module",
"span": {
"start": 123,
"end": 379,
"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": 214,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportNamespaceSpecifier",
"span": {
"start": 190,
"end": 202,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 195,
"end": 202,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 208,
"end": 213,
"ctxt": 0
},
"value": "./0",
"raw": "'./0'"
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 236,
"end": 262,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 243,
"end": 250,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 248,
"end": 250,
"ctxt": 0
},
"value": "ns",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 256,
"end": 261,
"ctxt": 0
},
"value": "./0",
"raw": "'./0'"
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExportDefaultExpression",
"span": {
"start": 263,
"end": 281,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 278,
"end": 280,
"ctxt": 0
},
"value": "ns",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 302,
"end": 323,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 309,
"end": 312,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 309,
"end": 312,
"ctxt": 0
},
"value": "foo",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 318,
"end": 323,
"ctxt": 0
},
"value": "./1",
"raw": "'./1'"
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 324,
"end": 347,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 331,
"end": 335,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 331,
"end": 335,
"ctxt": 0
},
"value": "foo1",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 341,
"end": 347,
"ctxt": 0
},
"value": "./11",
"raw": "'./11'"
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 349,
"end": 355,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 349,
"end": 354,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 349,
"end": 352,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 353,
"end": 354,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 356,
"end": 363,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 356,
"end": 362,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 356,
"end": 360,
"ctxt": 0
},
"value": "foo1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 361,
"end": 362,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 365,
"end": 371,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 365,
"end": 370,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 365,
"end": 368,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 369,
"end": 370,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 372,
"end": 379,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 372,
"end": 378,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 372,
"end": 376,
"ctxt": 0
},
"value": "foo1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 377,
"end": 378,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
}
],
"interpreter": null
}