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

1270 lines
26 KiB
JSON

{
"type": "Module",
"span": {
"start": 58,
"end": 657,
"ctxt": 0
},
"body": [
{
"type": "ExportDefaultExpression",
"span": {
"start": 58,
"end": 81,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 73,
"end": 80,
"ctxt": 0
},
"value": "hello",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 103,
"end": 130,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 110,
"end": 111,
"ctxt": 0
},
"value": "a",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 114,
"end": 129,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 122,
"end": 128,
"ctxt": 0
},
"value": "./t1",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 131,
"end": 141,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 131,
"end": 140,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 131,
"end": 132,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 133,
"end": 140,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 142,
"end": 163,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 149,
"end": 150,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 149,
"end": 150,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 156,
"end": 162,
"ctxt": 0
},
"value": "./t1",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 164,
"end": 166,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 164,
"end": 165,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 167,
"end": 193,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 174,
"end": 180,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 179,
"end": 180,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 186,
"end": 192,
"ctxt": 0
},
"value": "./t1",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 194,
"end": 204,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 194,
"end": 203,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 194,
"end": 195,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 196,
"end": 203,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 205,
"end": 241,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 214,
"end": 226,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 225,
"end": 226,
"ctxt": 0
},
"value": "d",
"optional": false
},
"imported": {
"type": "Identifier",
"span": {
"start": 214,
"end": 221,
"ctxt": 0
},
"value": "default",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 234,
"end": 240,
"ctxt": 0
},
"value": "./t1",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 242,
"end": 244,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 242,
"end": 243,
"ctxt": 0
},
"value": "d",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 245,
"end": 276,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 252,
"end": 254,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 252,
"end": 254,
"ctxt": 0
},
"value": "e1",
"optional": false
}
},
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 256,
"end": 263,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 261,
"end": 263,
"ctxt": 0
},
"value": "e2",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 269,
"end": 275,
"ctxt": 0
},
"value": "./t1",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 277,
"end": 280,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 277,
"end": 279,
"ctxt": 0
},
"value": "e1",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 281,
"end": 292,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 281,
"end": 291,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 281,
"end": 283,
"ctxt": 0
},
"value": "e2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 284,
"end": 291,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 293,
"end": 334,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 300,
"end": 302,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 300,
"end": 302,
"ctxt": 0
},
"value": "f1",
"optional": false
}
},
{
"type": "ImportSpecifier",
"span": {
"start": 306,
"end": 319,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 317,
"end": 319,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"imported": {
"type": "Identifier",
"span": {
"start": 306,
"end": 313,
"ctxt": 0
},
"value": "default",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 327,
"end": 333,
"ctxt": 0
},
"value": "./t1",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 335,
"end": 338,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 335,
"end": 337,
"ctxt": 0
},
"value": "f1",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 339,
"end": 342,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 339,
"end": 341,
"ctxt": 0
},
"value": "f2",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 343,
"end": 357,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 350,
"end": 356,
"ctxt": 0
},
"value": "./t1",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "TsImportEqualsDeclaration",
"span": {
"start": 379,
"end": 406,
"ctxt": 0
},
"declare": false,
"isExport": false,
"isTypeOnly": false,
"id": {
"type": "Identifier",
"span": {
"start": 386,
"end": 387,
"ctxt": 0
},
"value": "a",
"optional": false
},
"moduleRef": {
"type": "TsExternalModuleReference",
"span": {
"start": 390,
"end": 405,
"ctxt": 0
},
"expression": {
"type": "StringLiteral",
"span": {
"start": 398,
"end": 404,
"ctxt": 0
},
"value": "./t1",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 407,
"end": 417,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 407,
"end": 416,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 407,
"end": 408,
"ctxt": 0
},
"value": "a",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 409,
"end": 416,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 418,
"end": 439,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 425,
"end": 426,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 425,
"end": 426,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 432,
"end": 438,
"ctxt": 0
},
"value": "./t1",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 440,
"end": 442,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 440,
"end": 441,
"ctxt": 0
},
"value": "b",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 443,
"end": 469,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 450,
"end": 456,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 455,
"end": 456,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 462,
"end": 468,
"ctxt": 0
},
"value": "./t1",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 470,
"end": 480,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 470,
"end": 479,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 470,
"end": 471,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 472,
"end": 479,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 481,
"end": 517,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 490,
"end": 502,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 501,
"end": 502,
"ctxt": 0
},
"value": "d",
"optional": false
},
"imported": {
"type": "Identifier",
"span": {
"start": 490,
"end": 497,
"ctxt": 0
},
"value": "default",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 510,
"end": 516,
"ctxt": 0
},
"value": "./t1",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 518,
"end": 520,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 518,
"end": 519,
"ctxt": 0
},
"value": "d",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 521,
"end": 552,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 528,
"end": 530,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 528,
"end": 530,
"ctxt": 0
},
"value": "e1",
"optional": false
}
},
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 532,
"end": 539,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 537,
"end": 539,
"ctxt": 0
},
"value": "e2",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 545,
"end": 551,
"ctxt": 0
},
"value": "./t1",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 553,
"end": 556,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 553,
"end": 555,
"ctxt": 0
},
"value": "e1",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 557,
"end": 568,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 557,
"end": 567,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 557,
"end": 559,
"ctxt": 0
},
"value": "e2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 560,
"end": 567,
"ctxt": 0
},
"value": "default",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 569,
"end": 610,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"span": {
"start": 576,
"end": 578,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 576,
"end": 578,
"ctxt": 0
},
"value": "f1",
"optional": false
}
},
{
"type": "ImportSpecifier",
"span": {
"start": 582,
"end": 595,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 593,
"end": 595,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"imported": {
"type": "Identifier",
"span": {
"start": 582,
"end": 589,
"ctxt": 0
},
"value": "default",
"optional": false
},
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 603,
"end": 609,
"ctxt": 0
},
"value": "./t1",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 611,
"end": 614,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 611,
"end": 613,
"ctxt": 0
},
"value": "f1",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 615,
"end": 618,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 615,
"end": 617,
"ctxt": 0
},
"value": "f2",
"optional": false
}
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 619,
"end": 657,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 628,
"end": 629,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 628,
"end": 629,
"ctxt": 0
},
"value": "a",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 631,
"end": 632,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 631,
"end": 632,
"ctxt": 0
},
"value": "b",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 634,
"end": 635,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 634,
"end": 635,
"ctxt": 0
},
"value": "c",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 637,
"end": 638,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 637,
"end": 638,
"ctxt": 0
},
"value": "d",
"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": "e1",
"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": "e2",
"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": "f1",
"optional": false
},
"exported": null,
"isTypeOnly": false
},
{
"type": "ExportSpecifier",
"span": {
"start": 652,
"end": 654,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 652,
"end": 654,
"ctxt": 0
},
"value": "f2",
"optional": false
},
"exported": null,
"isTypeOnly": false
}
],
"source": null,
"typeOnly": false,
"asserts": null
}
],
"interpreter": null
}