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

237 lines
5.3 KiB
JSON

{
"type": "Module",
"span": {
"start": 21,
"end": 164,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 21,
"end": 38,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 34,
"end": 35,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 28,
"end": 38,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 60,
"end": 91,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportNamespaceSpecifier",
"span": {
"start": 67,
"end": 79,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 77,
"end": 79,
"ctxt": 0
},
"value": "ns",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 85,
"end": 90,
"ctxt": 0
},
"value": "./a",
"raw": "\"./a\""
},
"typeOnly": true,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 113,
"end": 138,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 122,
"end": 124,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 122,
"end": 124,
"ctxt": 0
},
"value": "ns",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 132,
"end": 137,
"ctxt": 0
},
"value": "./b",
"raw": "\"./b\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 139,
"end": 164,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 143,
"end": 163,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 143,
"end": 144,
"ctxt": 0
},
"value": "_",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 144,
"end": 150,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 146,
"end": 150,
"ctxt": 0
},
"typeName": {
"type": "TsQualifiedName",
"left": {
"type": "Identifier",
"span": {
"start": 146,
"end": 148,
"ctxt": 0
},
"value": "ns",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 149,
"end": 150,
"ctxt": 0
},
"value": "A",
"optional": false
}
},
"typeParams": null
}
}
},
"init": {
"type": "NewExpression",
"span": {
"start": 153,
"end": 163,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 157,
"end": 161,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 157,
"end": 159,
"ctxt": 0
},
"value": "ns",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 160,
"end": 161,
"ctxt": 0
},
"value": "A",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
}
],
"interpreter": null
}