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

1214 lines
25 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 54,
"end": 653,
"ctxt": 0
},
"body": [
{
"type": "ExportDefaultExpression",
"span": {
"start": 54,
"end": 77,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 69,
"end": 76,
"ctxt": 0
},
"value": "hello",
"raw": "\"hello\""
}
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 99,
"end": 126,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 106,
"end": 107,
"ctxt": 0
},
"value": "a",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 110,
"end": 125,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 118,
"end": 124,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 127,
"end": 137,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 127,
"end": 136,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 127,
"end": 128,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 129,
"end": 136,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 138,
"end": 159,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 145,
"end": 146,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 145,
"end": 146,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 152,
"end": 158,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 160,
"end": 162,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 160,
"end": 161,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 163,
"end": 189,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 170,
"end": 176,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 175,
"end": 176,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 182,
"end": 188,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 190,
"end": 200,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 190,
"end": 199,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 190,
"end": 191,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 192,
"end": 199,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 201,
"end": 237,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 210,
"end": 222,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 221,
"end": 222,
"ctxt": 0
},
"value": "d",
"optional": false
},
"imported": {
"type": "Identifier",
"span": {
"start": 210,
"end": 217,
"ctxt": 0
},
"value": "default",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 230,
"end": 236,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 238,
"end": 240,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 238,
"end": 239,
"ctxt": 0
},
"value": "d",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 241,
"end": 272,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 248,
"end": 250,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 248,
"end": 250,
"ctxt": 0
},
"value": "e1",
"optional": false
}
},
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 252,
"end": 259,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 257,
"end": 259,
"ctxt": 0
},
"value": "e2",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 265,
"end": 271,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 273,
"end": 276,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 273,
"end": 275,
"ctxt": 0
},
"value": "e1",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 277,
"end": 288,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 277,
"end": 287,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 277,
"end": 279,
"ctxt": 0
},
"value": "e2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 280,
"end": 287,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 289,
"end": 330,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 296,
"end": 298,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 296,
"end": 298,
"ctxt": 0
},
"value": "f1",
"optional": false
}
},
{
"type": "ImportSpecifier",
"span": {
"start": 302,
"end": 315,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 313,
"end": 315,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"imported": {
"type": "Identifier",
"span": {
"start": 302,
"end": 309,
"ctxt": 0
},
"value": "default",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 323,
"end": 329,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 331,
"end": 334,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 331,
"end": 333,
"ctxt": 0
},
"value": "f1",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 335,
"end": 338,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 335,
"end": 337,
"ctxt": 0
},
"value": "f2",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 339,
"end": 353,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 346,
"end": 352,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 375,
"end": 402,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 382,
"end": 383,
"ctxt": 0
},
"value": "a",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 386,
"end": 401,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 394,
"end": 400,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 403,
"end": 413,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 403,
"end": 412,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 403,
"end": 404,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 405,
"end": 412,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 414,
"end": 435,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 421,
"end": 422,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 421,
"end": 422,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 428,
"end": 434,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 436,
"end": 438,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 436,
"end": 437,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 439,
"end": 465,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 446,
"end": 452,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 451,
"end": 452,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 458,
"end": 464,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 466,
"end": 476,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 466,
"end": 475,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 466,
"end": 467,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 468,
"end": 475,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 477,
"end": 513,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 486,
"end": 498,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 497,
"end": 498,
"ctxt": 0
},
"value": "d",
"optional": false
},
"imported": {
"type": "Identifier",
"span": {
"start": 486,
"end": 493,
"ctxt": 0
},
"value": "default",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 506,
"end": 512,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 514,
"end": 516,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 514,
"end": 515,
"ctxt": 0
},
"value": "d",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 517,
"end": 548,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 524,
"end": 526,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 524,
"end": 526,
"ctxt": 0
},
"value": "e1",
"optional": false
}
},
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 528,
"end": 535,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 533,
"end": 535,
"ctxt": 0
},
"value": "e2",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 541,
"end": 547,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 549,
"end": 552,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 549,
"end": 551,
"ctxt": 0
},
"value": "e1",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 553,
"end": 564,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 553,
"end": 563,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 553,
"end": 555,
"ctxt": 0
},
"value": "e2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 556,
"end": 563,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 565,
"end": 606,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 572,
"end": 574,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 572,
"end": 574,
"ctxt": 0
},
"value": "f1",
"optional": false
}
},
{
"type": "ImportSpecifier",
"span": {
"start": 578,
"end": 591,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 589,
"end": 591,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"imported": {
"type": "Identifier",
"span": {
"start": 578,
"end": 585,
"ctxt": 0
},
"value": "default",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 599,
"end": 605,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 607,
"end": 610,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 607,
"end": 609,
"ctxt": 0
},
"value": "f1",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 611,
"end": 614,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 611,
"end": 613,
"ctxt": 0
},
"value": "f2",
"optional": false
}
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 615,
"end": 653,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 624,
"end": 625,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 624,
"end": 625,
"ctxt": 0
},
"value": "a",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 627,
"end": 628,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 627,
"end": 628,
"ctxt": 0
},
"value": "b",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 630,
"end": 631,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 630,
"end": 631,
"ctxt": 0
},
"value": "c",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 633,
"end": 634,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 633,
"end": 634,
"ctxt": 0
},
"value": "d",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 636,
"end": 638,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 636,
"end": 638,
"ctxt": 0
},
"value": "e1",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 640,
"end": 642,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 640,
"end": 642,
"ctxt": 0
},
"value": "e2",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 644,
"end": 646,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 644,
"end": 646,
"ctxt": 0
},
"value": "f1",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 648,
"end": 650,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 648,
"end": 650,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"exported": null,
"isTypeOnly": false
}
],
"source": null,
"typeOnly": false,
"asserts": null
}
],
"interpreter": null
}