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

857 lines
19 KiB
JSON

{
"type": "Module",
"span": {
"start": 44,
"end": 514,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 44,
"end": 61,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 57,
"end": 58,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 51,
"end": 61,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 62,
"end": 79,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 75,
"end": 76,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
"start": 69,
"end": 79,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 80,
"end": 97,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 93,
"end": 94,
"ctxt": 0
},
"value": "X",
"optional": false
},
"declare": false,
"span": {
"start": 87,
"end": 97,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
},
{
"type": "ExportAllDeclaration",
"span": {
"start": 119,
"end": 144,
"ctxt": 0
},
"source": {
"type": "StringLiteral",
"span": {
"start": 138,
"end": 143,
"ctxt": 0
},
"value": "./a",
"raw": "\"./a\""
},
"typeOnly": true,
"asserts": null
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 145,
"end": 169,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 154,
"end": 155,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 154,
"end": 155,
"ctxt": 0
},
"value": "X",
"optional": false
},
"exported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 163,
"end": 168,
"ctxt": 0
},
"value": "./a",
"raw": "\"./a\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 191,
"end": 226,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 200,
"end": 201,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 200,
"end": 201,
"ctxt": 0
},
"value": "A",
"optional": false
},
"imported": null,
"isTypeOnly": false
},
{
"type": "ImportSpecifier",
"span": {
"start": 203,
"end": 209,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 208,
"end": 209,
"ctxt": 0
},
"value": "C",
"optional": false
},
"imported": {
"type": "Identifier",
"span": {
"start": 203,
"end": 204,
"ctxt": 0
},
"value": "B",
"optional": false
},
"isTypeOnly": false
},
{
"type": "ImportSpecifier",
"span": {
"start": 211,
"end": 212,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 211,
"end": 212,
"ctxt": 0
},
"value": "X",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 220,
"end": 225,
"ctxt": 0
},
"value": "./b",
"raw": "\"./b\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 227,
"end": 246,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 231,
"end": 245,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 231,
"end": 232,
"ctxt": 0
},
"value": "_",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 232,
"end": 235,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 234,
"end": 235,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 234,
"end": 235,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "NewExpression",
"span": {
"start": 238,
"end": 245,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 242,
"end": 243,
"ctxt": 0
},
"value": "A",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 258,
"end": 278,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 262,
"end": 277,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 262,
"end": 264,
"ctxt": 0
},
"value": "__",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 264,
"end": 267,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 266,
"end": 267,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 266,
"end": 267,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "NewExpression",
"span": {
"start": 270,
"end": 277,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 274,
"end": 275,
"ctxt": 0
},
"value": "C",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 289,
"end": 310,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 293,
"end": 309,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 293,
"end": 296,
"ctxt": 0
},
"value": "___",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 296,
"end": 299,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 298,
"end": 299,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 298,
"end": 299,
"ctxt": 0
},
"value": "X",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "NewExpression",
"span": {
"start": 302,
"end": 309,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 306,
"end": 307,
"ctxt": 0
},
"value": "X",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExportAllDeclaration",
"span": {
"start": 338,
"end": 363,
"ctxt": 0
},
"source": {
"type": "StringLiteral",
"span": {
"start": 357,
"end": 362,
"ctxt": 0
},
"value": "./a",
"raw": "\"./a\""
},
"typeOnly": true,
"asserts": null
},
{
"type": "ExportAllDeclaration",
"span": {
"start": 364,
"end": 384,
"ctxt": 0
},
"source": {
"type": "StringLiteral",
"span": {
"start": 378,
"end": 383,
"ctxt": 0
},
"value": "./a",
"raw": "\"./a\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 406,
"end": 436,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 415,
"end": 416,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 415,
"end": 416,
"ctxt": 0
},
"value": "A",
"optional": false
},
"imported": null,
"isTypeOnly": false
},
{
"type": "ImportSpecifier",
"span": {
"start": 418,
"end": 419,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 418,
"end": 419,
"ctxt": 0
},
"value": "B",
"optional": false
},
"imported": null,
"isTypeOnly": false
},
{
"type": "ImportSpecifier",
"span": {
"start": 421,
"end": 422,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 421,
"end": 422,
"ctxt": 0
},
"value": "X",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 430,
"end": 435,
"ctxt": 0
},
"value": "./d",
"raw": "\"./d\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 437,
"end": 456,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 441,
"end": 455,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 441,
"end": 442,
"ctxt": 0
},
"value": "_",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 442,
"end": 445,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 444,
"end": 445,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 444,
"end": 445,
"ctxt": 0
},
"value": "A",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "NewExpression",
"span": {
"start": 448,
"end": 455,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 452,
"end": 453,
"ctxt": 0
},
"value": "A",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 465,
"end": 485,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 469,
"end": 484,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 469,
"end": 471,
"ctxt": 0
},
"value": "__",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 471,
"end": 474,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 473,
"end": 474,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 473,
"end": 474,
"ctxt": 0
},
"value": "B",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "NewExpression",
"span": {
"start": 477,
"end": 484,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 481,
"end": 482,
"ctxt": 0
},
"value": "B",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 493,
"end": 514,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 497,
"end": 513,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 497,
"end": 500,
"ctxt": 0
},
"value": "___",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 500,
"end": 503,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 502,
"end": 503,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 502,
"end": 503,
"ctxt": 0
},
"value": "X",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "NewExpression",
"span": {
"start": 506,
"end": 513,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 510,
"end": 511,
"ctxt": 0
},
"value": "X",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
}
],
"interpreter": null
}