swc/crates/swc_ecma_parser/tests/tsc/exportsAndImports4-amd.json

1214 lines
25 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 53,
"end": 652,
"ctxt": 0
},
"body": [
{
"type": "ExportDefaultExpression",
"span": {
"start": 53,
"end": 76,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 68,
"end": 75,
"ctxt": 0
},
"value": "hello",
"raw": "\"hello\""
}
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 98,
"end": 125,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 105,
"end": 106,
"ctxt": 0
},
"value": "a",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 109,
"end": 124,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 117,
"end": 123,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 126,
"end": 136,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 126,
"end": 135,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 126,
"end": 127,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 128,
"end": 135,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 137,
"end": 158,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 144,
"end": 145,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 144,
"end": 145,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 151,
"end": 157,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 159,
"end": 161,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 159,
"end": 160,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 162,
"end": 188,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 169,
"end": 175,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 174,
"end": 175,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 181,
"end": 187,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 189,
"end": 199,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 189,
"end": 198,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 189,
"end": 190,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 191,
"end": 198,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 200,
"end": 236,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 209,
"end": 221,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 220,
"end": 221,
"ctxt": 0
},
"value": "d",
"optional": false
},
"imported": {
"type": "Identifier",
"span": {
"start": 209,
"end": 216,
"ctxt": 0
},
"value": "default",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 229,
"end": 235,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 237,
"end": 239,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 237,
"end": 238,
"ctxt": 0
},
"value": "d",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 240,
"end": 271,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 247,
"end": 249,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 247,
"end": 249,
"ctxt": 0
},
"value": "e1",
"optional": false
}
},
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 251,
"end": 258,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 256,
"end": 258,
"ctxt": 0
},
"value": "e2",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 264,
"end": 270,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 272,
"end": 275,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 272,
"end": 274,
"ctxt": 0
},
"value": "e1",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 276,
"end": 287,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 276,
"end": 286,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 276,
"end": 278,
"ctxt": 0
},
"value": "e2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 279,
"end": 286,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 288,
"end": 329,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 295,
"end": 297,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 295,
"end": 297,
"ctxt": 0
},
"value": "f1",
"optional": false
}
},
{
"type": "ImportSpecifier",
"span": {
"start": 301,
"end": 314,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 312,
"end": 314,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"imported": {
"type": "Identifier",
"span": {
"start": 301,
"end": 308,
"ctxt": 0
},
"value": "default",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 322,
"end": 328,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 330,
"end": 333,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 330,
"end": 332,
"ctxt": 0
},
"value": "f1",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 334,
"end": 337,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 334,
"end": 336,
"ctxt": 0
},
"value": "f2",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 338,
"end": 352,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 345,
"end": 351,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 374,
"end": 401,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 381,
"end": 382,
"ctxt": 0
},
"value": "a",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 385,
"end": 400,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 393,
"end": 399,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 402,
"end": 412,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 402,
"end": 411,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 402,
"end": 403,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 404,
"end": 411,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 413,
"end": 434,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 420,
"end": 421,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 420,
"end": 421,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 427,
"end": 433,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 435,
"end": 437,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 435,
"end": 436,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 438,
"end": 464,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 445,
"end": 451,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 450,
"end": 451,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 457,
"end": 463,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 465,
"end": 475,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 465,
"end": 474,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 465,
"end": 466,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 467,
"end": 474,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 476,
"end": 512,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 485,
"end": 497,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 496,
"end": 497,
"ctxt": 0
},
"value": "d",
"optional": false
},
"imported": {
"type": "Identifier",
"span": {
"start": 485,
"end": 492,
"ctxt": 0
},
"value": "default",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 505,
"end": 511,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 513,
"end": 515,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 513,
"end": 514,
"ctxt": 0
},
"value": "d",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 516,
"end": 547,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 523,
"end": 525,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 523,
"end": 525,
"ctxt": 0
},
"value": "e1",
"optional": false
}
},
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 527,
"end": 534,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 532,
"end": 534,
"ctxt": 0
},
"value": "e2",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 540,
"end": 546,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 548,
"end": 551,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 548,
"end": 550,
"ctxt": 0
},
"value": "e1",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 552,
"end": 563,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 552,
"end": 562,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 552,
"end": 554,
"ctxt": 0
},
"value": "e2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 555,
"end": 562,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 564,
"end": 605,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 571,
"end": 573,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 571,
"end": 573,
"ctxt": 0
},
"value": "f1",
"optional": false
}
},
{
"type": "ImportSpecifier",
"span": {
"start": 577,
"end": 590,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 588,
"end": 590,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"imported": {
"type": "Identifier",
"span": {
"start": 577,
"end": 584,
"ctxt": 0
},
"value": "default",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 598,
"end": 604,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 606,
"end": 609,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 606,
"end": 608,
"ctxt": 0
},
"value": "f1",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 610,
"end": 613,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 610,
"end": 612,
"ctxt": 0
},
"value": "f2",
"optional": false
}
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 614,
"end": 652,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 623,
"end": 624,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 623,
"end": 624,
"ctxt": 0
},
"value": "a",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 626,
"end": 627,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 626,
"end": 627,
"ctxt": 0
},
"value": "b",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 629,
"end": 630,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 629,
"end": 630,
"ctxt": 0
},
"value": "c",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 632,
"end": 633,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 632,
"end": 633,
"ctxt": 0
},
"value": "d",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 635,
"end": 637,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 635,
"end": 637,
"ctxt": 0
},
"value": "e1",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 639,
"end": 641,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 639,
"end": 641,
"ctxt": 0
},
"value": "e2",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 643,
"end": 645,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 643,
"end": 645,
"ctxt": 0
},
"value": "f1",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 647,
"end": 649,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 647,
"end": 649,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"exported": null,
"isTypeOnly": false
}
],
"source": null,
"typeOnly": false,
"asserts": null
}
],
"interpreter": null
}