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

1176 lines
25 KiB
JSON

{
"type": "Module",
"span": {
"start": 114,
"end": 1075,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 114,
"end": 133,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 127,
"end": 130,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"declare": false,
"span": {
"start": 121,
"end": 133,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 157,
"end": 182,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 173,
"end": 177,
"ctxt": 0
},
"value": "func",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 164,
"end": 182,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 180,
"end": 182,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
},
{
"type": "ExportAllDeclaration",
"span": {
"start": 205,
"end": 227,
"ctxt": 0
},
"source": {
"type": "StringLiteral",
"span": {
"start": 219,
"end": 226,
"ctxt": 0
},
"value": "./cls",
"raw": "\"./cls\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExportAllDeclaration",
"span": {
"start": 251,
"end": 274,
"ctxt": 0
},
"source": {
"type": "StringLiteral",
"span": {
"start": 265,
"end": 273,
"ctxt": 0
},
"value": "./func",
"raw": "\"./func\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExportAllDeclaration",
"span": {
"start": 275,
"end": 297,
"ctxt": 0
},
"source": {
"type": "StringLiteral",
"span": {
"start": 289,
"end": 296,
"ctxt": 0
},
"value": "./cls",
"raw": "\"./cls\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 320,
"end": 346,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 328,
"end": 331,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 328,
"end": 331,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 338,
"end": 345,
"ctxt": 0
},
"value": "./cls",
"raw": "\"./cls\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 347,
"end": 360,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 355,
"end": 358,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 355,
"end": 358,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"exported": null,
"isTypeOnly": false
}
],
"source": null,
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 383,
"end": 411,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 390,
"end": 397,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 395,
"end": 397,
"ctxt": 0
},
"value": "ns",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 403,
"end": 410,
"ctxt": 0
},
"value": "./cls",
"raw": "\"./cls\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExportDefaultExpression",
"span": {
"start": 412,
"end": 430,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 427,
"end": 429,
"ctxt": 0
},
"value": "ns",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 453,
"end": 481,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 460,
"end": 467,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 465,
"end": 467,
"ctxt": 0
},
"value": "ns",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 473,
"end": 480,
"ctxt": 0
},
"value": "./cls",
"raw": "\"./cls\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 482,
"end": 494,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 490,
"end": 492,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 490,
"end": 492,
"ctxt": 0
},
"value": "ns",
"optional": false
},
"exported": null,
"isTypeOnly": false
}
],
"source": null,
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 517,
"end": 545,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 524,
"end": 531,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 529,
"end": 531,
"ctxt": 0
},
"value": "ns",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 537,
"end": 544,
"ctxt": 0
},
"value": "./cls",
"raw": "\"./cls\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 546,
"end": 578,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 555,
"end": 575,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 555,
"end": 557,
"ctxt": 0
},
"value": "ns",
"optional": false
},
"exported": {
"type": "Identifier",
"span": {
"start": 561,
"end": 575,
"ctxt": 0
},
"value": "classContainer",
"optional": false
},
"isTypeOnly": false
}
],
"source": null,
"typeOnly": false,
"asserts": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 601,
"end": 629,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 607,
"end": 628,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 607,
"end": 609,
"ctxt": 0
},
"value": "ns",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 612,
"end": 628,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 612,
"end": 619,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 620,
"end": 627,
"ctxt": 0
},
"value": "./cls",
"raw": "\"./cls\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 630,
"end": 654,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 630,
"end": 653,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 630,
"end": 644,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 630,
"end": 636,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 637,
"end": 644,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 647,
"end": 653,
"ctxt": 0
},
"properties": [
{
"type": "Identifier",
"span": {
"start": 649,
"end": 651,
"ctxt": 0
},
"value": "ns",
"optional": false
}
]
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 678,
"end": 706,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 684,
"end": 705,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 684,
"end": 686,
"ctxt": 0
},
"value": "ns",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 689,
"end": 705,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 689,
"end": 696,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 697,
"end": 704,
"ctxt": 0
},
"value": "./cls",
"raw": "\"./cls\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 707,
"end": 727,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 707,
"end": 726,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 707,
"end": 721,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 707,
"end": 713,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 714,
"end": 721,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 724,
"end": 726,
"ctxt": 0
},
"value": "ns",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 751,
"end": 779,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 757,
"end": 778,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 757,
"end": 759,
"ctxt": 0
},
"value": "ns",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 762,
"end": 778,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 762,
"end": 769,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 770,
"end": 777,
"ctxt": 0
},
"value": "./cls",
"raw": "\"./cls\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 780,
"end": 803,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 780,
"end": 802,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 780,
"end": 797,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 780,
"end": 794,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 780,
"end": 786,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 787,
"end": 794,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 795,
"end": 797,
"ctxt": 0
},
"value": "ns",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 800,
"end": 802,
"ctxt": 0
},
"value": "ns",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 827,
"end": 855,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 833,
"end": 854,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 833,
"end": 835,
"ctxt": 0
},
"value": "ns",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 838,
"end": 854,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 838,
"end": 845,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 846,
"end": 853,
"ctxt": 0
},
"value": "./cls",
"raw": "\"./cls\""
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 856,
"end": 882,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 856,
"end": 881,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 856,
"end": 876,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 856,
"end": 870,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 856,
"end": 862,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 863,
"end": 870,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 871,
"end": 876,
"ctxt": 0
},
"value": "names",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 879,
"end": 881,
"ctxt": 0
},
"value": "ns",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 912,
"end": 928,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 919,
"end": 927,
"ctxt": 0
},
"value": "./cjs4",
"raw": "\"./cjs4\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 929,
"end": 945,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 936,
"end": 944,
"ctxt": 0
},
"value": "./cjs3",
"raw": "\"./cjs3\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 946,
"end": 962,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 953,
"end": 961,
"ctxt": 0
},
"value": "./cjs2",
"raw": "\"./cjs2\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 963,
"end": 978,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 970,
"end": 977,
"ctxt": 0
},
"value": "./cjs",
"raw": "\"./cjs\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 979,
"end": 994,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 986,
"end": 993,
"ctxt": 0
},
"value": "./bol",
"raw": "\"./bol\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 995,
"end": 1010,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 1002,
"end": 1009,
"ctxt": 0
},
"value": "./ban",
"raw": "\"./ban\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 1011,
"end": 1026,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 1018,
"end": 1025,
"ctxt": 0
},
"value": "./bat",
"raw": "\"./bat\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 1027,
"end": 1042,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 1034,
"end": 1041,
"ctxt": 0
},
"value": "./baz",
"raw": "\"./baz\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 1043,
"end": 1058,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 1050,
"end": 1057,
"ctxt": 0
},
"value": "./bar",
"raw": "\"./bar\""
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 1059,
"end": 1075,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 1066,
"end": 1074,
"ctxt": 0
},
"value": "./bar2",
"raw": "\"./bar2\""
},
"typeOnly": false,
"asserts": null
}
],
"interpreter": null
}