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

1214 lines
25 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 59,
"end": 658,
"ctxt": 0
},
"body": [
{
"type": "ExportDefaultExpression",
"span": {
"start": 59,
"end": 82,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 74,
"end": 81,
"ctxt": 0
},
"value": "hello",
"raw": "\"hello\""
}
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 104,
"end": 131,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 111,
"end": 112,
"ctxt": 0
},
"value": "a",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 115,
"end": 130,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 123,
"end": 129,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 132,
"end": 142,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 132,
"end": 141,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 132,
"end": 133,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 134,
"end": 141,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 143,
"end": 164,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 150,
"end": 151,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 150,
"end": 151,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 157,
"end": 163,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 165,
"end": 167,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 165,
"end": 166,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 168,
"end": 194,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 175,
"end": 181,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 180,
"end": 181,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 187,
"end": 193,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 195,
"end": 205,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 195,
"end": 204,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 195,
"end": 196,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 197,
"end": 204,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 206,
"end": 242,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 215,
"end": 227,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 226,
"end": 227,
"ctxt": 0
},
"value": "d",
"optional": false
},
"imported": {
"type": "Identifier",
"span": {
"start": 215,
"end": 222,
"ctxt": 0
},
"value": "default",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 235,
"end": 241,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 243,
"end": 245,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 243,
"end": 244,
"ctxt": 0
},
"value": "d",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 246,
"end": 277,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 253,
"end": 255,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 253,
"end": 255,
"ctxt": 0
},
"value": "e1",
"optional": false
}
},
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 257,
"end": 264,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 262,
"end": 264,
"ctxt": 0
},
"value": "e2",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 270,
"end": 276,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 278,
"end": 281,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 278,
"end": 280,
"ctxt": 0
},
"value": "e1",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 282,
"end": 293,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 282,
"end": 292,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 282,
"end": 284,
"ctxt": 0
},
"value": "e2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 285,
"end": 292,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 294,
"end": 335,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 301,
"end": 303,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 301,
"end": 303,
"ctxt": 0
},
"value": "f1",
"optional": false
}
},
{
"type": "ImportSpecifier",
"span": {
"start": 307,
"end": 320,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 318,
"end": 320,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"imported": {
"type": "Identifier",
"span": {
"start": 307,
"end": 314,
"ctxt": 0
},
"value": "default",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 328,
"end": 334,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 336,
"end": 339,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 336,
"end": 338,
"ctxt": 0
},
"value": "f1",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 340,
"end": 343,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 340,
"end": 342,
"ctxt": 0
},
"value": "f2",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 344,
"end": 358,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 351,
"end": 357,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 380,
"end": 407,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 387,
"end": 388,
"ctxt": 0
},
"value": "a",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 391,
"end": 406,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 399,
"end": 405,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 408,
"end": 418,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 408,
"end": 417,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 408,
"end": 409,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 410,
"end": 417,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 419,
"end": 440,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 426,
"end": 427,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 426,
"end": 427,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 433,
"end": 439,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 441,
"end": 443,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 441,
"end": 442,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 444,
"end": 470,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 451,
"end": 457,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 456,
"end": 457,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 463,
"end": 469,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 471,
"end": 481,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 471,
"end": 480,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 471,
"end": 472,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 473,
"end": 480,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 482,
"end": 518,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 491,
"end": 503,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 502,
"end": 503,
"ctxt": 0
},
"value": "d",
"optional": false
},
"imported": {
"type": "Identifier",
"span": {
"start": 491,
"end": 498,
"ctxt": 0
},
"value": "default",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 511,
"end": 517,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 519,
"end": 521,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 519,
"end": 520,
"ctxt": 0
},
"value": "d",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 522,
"end": 553,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 529,
"end": 531,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 529,
"end": 531,
"ctxt": 0
},
"value": "e1",
"optional": false
}
},
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 533,
"end": 540,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 538,
"end": 540,
"ctxt": 0
},
"value": "e2",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 546,
"end": 552,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 554,
"end": 557,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 554,
"end": 556,
"ctxt": 0
},
"value": "e1",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 558,
"end": 569,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 558,
"end": 568,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 558,
"end": 560,
"ctxt": 0
},
"value": "e2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 561,
"end": 568,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 570,
"end": 611,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 577,
"end": 579,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 577,
"end": 579,
"ctxt": 0
},
"value": "f1",
"optional": false
}
},
{
"type": "ImportSpecifier",
"span": {
"start": 583,
"end": 596,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 594,
"end": 596,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"imported": {
"type": "Identifier",
"span": {
"start": 583,
"end": 590,
"ctxt": 0
},
"value": "default",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 604,
"end": 610,
"ctxt": 0
},
"value": "./t1",
"raw": "\"./t1\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 612,
"end": 615,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 612,
"end": 614,
"ctxt": 0
},
"value": "f1",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 616,
"end": 619,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 616,
"end": 618,
"ctxt": 0
},
"value": "f2",
"optional": false
}
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 620,
"end": 658,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 629,
"end": 630,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 629,
"end": 630,
"ctxt": 0
},
"value": "a",
"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": "b",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 635,
"end": 636,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 635,
"end": 636,
"ctxt": 0
},
"value": "c",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 638,
"end": 639,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 638,
"end": 639,
"ctxt": 0
},
"value": "d",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 641,
"end": 643,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 641,
"end": 643,
"ctxt": 0
},
"value": "e1",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 645,
"end": 647,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 645,
"end": 647,
"ctxt": 0
},
"value": "e2",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 649,
"end": 651,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 649,
"end": 651,
"ctxt": 0
},
"value": "f1",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 653,
"end": 655,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 653,
"end": 655,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"exported": null,
"isTypeOnly": false
}
],
"source": null,
"typeOnly": false,
"asserts": null
}
],
"interpreter": null
}