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

338 lines
7.4 KiB
JSON

{
"type": "Module",
"span": {
"start": 21,
"end": 245,
"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": "ExportDeclaration",
"span": {
"start": 39,
"end": 56,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 52,
"end": 53,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
"start": 46,
"end": 56,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
},
{
"type": "ExportAllDeclaration",
"span": {
"start": 78,
"end": 103,
"ctxt": 0
},
"source": {
"type": "StringLiteral",
"span": {
"start": 97,
"end": 102,
"ctxt": 0
},
"value": "./a",
"raw": "\"./a\""
},
"typeOnly": true,
"asserts": null
},
{
"type": "ExportAllDeclaration",
"span": {
"start": 125,
"end": 145,
"ctxt": 0
},
"source": {
"type": "StringLiteral",
"span": {
"start": 139,
"end": 144,
"ctxt": 0
},
"value": "./b",
"raw": "\"./b\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 167,
"end": 194,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 176,
"end": 177,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 176,
"end": 177,
"ctxt": 0
},
"value": "A",
"optional": false
},
"imported": null,
"isTypeOnly": false
},
{
"type": "ImportSpecifier",
"span": {
"start": 179,
"end": 180,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 179,
"end": 180,
"ctxt": 0
},
"value": "B",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 188,
"end": 193,
"ctxt": 0
},
"value": "./c",
"raw": "\"./c\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 195,
"end": 214,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 199,
"end": 213,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 199,
"end": 200,
"ctxt": 0
},
"value": "_",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 200,
"end": 203,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 202,
"end": 203,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 202,
"end": 203,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "NewExpression",
"span": {
"start": 206,
"end": 213,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 210,
"end": 211,
"ctxt": 0
},
"value": "A",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 225,
"end": 245,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 229,
"end": 244,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 229,
"end": 231,
"ctxt": 0
},
"value": "__",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 231,
"end": 234,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 233,
"end": 234,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 233,
"end": 234,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "NewExpression",
"span": {
"start": 237,
"end": 244,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 241,
"end": 242,
"ctxt": 0
},
"value": "B",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
}
],
"interpreter": null
}