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

1257 lines
27 KiB
JSON

{
"type": "Module",
"span": {
"start": 113,
"end": 1074,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 113,
"end": 132,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 126,
"end": 129,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"declare": false,
"span": {
"start": 120,
"end": 132,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 156,
"end": 181,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 172,
"end": 176,
"ctxt": 0
},
"value": "func",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 163,
"end": 181,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 179,
"end": 181,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
},
{
"type": "ExportAllDeclaration",
"span": {
"start": 204,
"end": 226,
"ctxt": 0
},
"source": {
"type": "StringLiteral",
"span": {
"start": 218,
"end": 225,
"ctxt": 0
},
"value": "./cls",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"asserts": null
},
{
"type": "ExportAllDeclaration",
"span": {
"start": 250,
"end": 273,
"ctxt": 0
},
"source": {
"type": "StringLiteral",
"span": {
"start": 264,
"end": 272,
"ctxt": 0
},
"value": "./func",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"asserts": null
},
{
"type": "ExportAllDeclaration",
"span": {
"start": 274,
"end": 296,
"ctxt": 0
},
"source": {
"type": "StringLiteral",
"span": {
"start": 288,
"end": 295,
"ctxt": 0
},
"value": "./cls",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 319,
"end": 345,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportSpecifier",
"span": {
"start": 327,
"end": 330,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 327,
"end": 330,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"imported": null,
"isTypeOnly": false
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 337,
"end": 344,
"ctxt": 0
},
"value": "./cls",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 346,
"end": 359,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 354,
"end": 357,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 354,
"end": 357,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"exported": null,
"isTypeOnly": false
}
],
"source": null,
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 382,
"end": 410,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 389,
"end": 396,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 394,
"end": 396,
"ctxt": 0
},
"value": "ns",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 402,
"end": 409,
"ctxt": 0
},
"value": "./cls",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExportDefaultExpression",
"span": {
"start": 411,
"end": 429,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 426,
"end": 428,
"ctxt": 0
},
"value": "ns",
"optional": false
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 452,
"end": 480,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 459,
"end": 466,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 464,
"end": 466,
"ctxt": 0
},
"value": "ns",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 472,
"end": 479,
"ctxt": 0
},
"value": "./cls",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 481,
"end": 493,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 489,
"end": 491,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 489,
"end": 491,
"ctxt": 0
},
"value": "ns",
"optional": false
},
"exported": null,
"isTypeOnly": false
}
],
"source": null,
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 516,
"end": 544,
"ctxt": 0
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"span": {
"start": 523,
"end": 530,
"ctxt": 0
},
"local": {
"type": "Identifier",
"span": {
"start": 528,
"end": 530,
"ctxt": 0
},
"value": "ns",
"optional": false
}
}
],
"source": {
"type": "StringLiteral",
"span": {
"start": 536,
"end": 543,
"ctxt": 0
},
"value": "./cls",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 545,
"end": 577,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 554,
"end": 574,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 554,
"end": 556,
"ctxt": 0
},
"value": "ns",
"optional": false
},
"exported": {
"type": "Identifier",
"span": {
"start": 560,
"end": 574,
"ctxt": 0
},
"value": "classContainer",
"optional": false
},
"isTypeOnly": false
}
],
"source": null,
"typeOnly": false,
"asserts": null
},
{
"type": "VariableDeclaration",
"span": {
"start": 600,
"end": 628,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 606,
"end": 627,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 606,
"end": 608,
"ctxt": 0
},
"value": "ns",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 611,
"end": 627,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 611,
"end": 618,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 619,
"end": 626,
"ctxt": 0
},
"value": "./cls",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 629,
"end": 653,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 629,
"end": 652,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 629,
"end": 643,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 629,
"end": 635,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 636,
"end": 643,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 646,
"end": 652,
"ctxt": 0
},
"properties": [
{
"type": "Identifier",
"span": {
"start": 648,
"end": 650,
"ctxt": 0
},
"value": "ns",
"optional": false
}
]
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 677,
"end": 705,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 683,
"end": 704,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 683,
"end": 685,
"ctxt": 0
},
"value": "ns",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 688,
"end": 704,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 688,
"end": 695,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 696,
"end": 703,
"ctxt": 0
},
"value": "./cls",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 706,
"end": 726,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 706,
"end": 725,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 706,
"end": 720,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 706,
"end": 712,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 713,
"end": 720,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 723,
"end": 725,
"ctxt": 0
},
"value": "ns",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 750,
"end": 778,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 756,
"end": 777,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 756,
"end": 758,
"ctxt": 0
},
"value": "ns",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 761,
"end": 777,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 761,
"end": 768,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 769,
"end": 776,
"ctxt": 0
},
"value": "./cls",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 779,
"end": 802,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 779,
"end": 801,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 779,
"end": 796,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 779,
"end": 793,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 779,
"end": 785,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 786,
"end": 793,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 794,
"end": 796,
"ctxt": 0
},
"value": "ns",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 799,
"end": 801,
"ctxt": 0
},
"value": "ns",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 826,
"end": 854,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 832,
"end": 853,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 832,
"end": 834,
"ctxt": 0
},
"value": "ns",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 837,
"end": 853,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 837,
"end": 844,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 845,
"end": 852,
"ctxt": 0
},
"value": "./cls",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 855,
"end": 881,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 855,
"end": 880,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 855,
"end": 875,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 855,
"end": 869,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 855,
"end": 861,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 862,
"end": 869,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 870,
"end": 875,
"ctxt": 0
},
"value": "names",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 878,
"end": 880,
"ctxt": 0
},
"value": "ns",
"optional": false
}
}
},
{
"type": "ImportDeclaration",
"span": {
"start": 911,
"end": 927,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 918,
"end": 926,
"ctxt": 0
},
"value": "./cjs4",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 928,
"end": 944,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 935,
"end": 943,
"ctxt": 0
},
"value": "./cjs3",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 945,
"end": 961,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 952,
"end": 960,
"ctxt": 0
},
"value": "./cjs2",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 962,
"end": 977,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 969,
"end": 976,
"ctxt": 0
},
"value": "./cjs",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 978,
"end": 993,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 985,
"end": 992,
"ctxt": 0
},
"value": "./bol",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 994,
"end": 1009,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 1001,
"end": 1008,
"ctxt": 0
},
"value": "./ban",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 1010,
"end": 1025,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 1017,
"end": 1024,
"ctxt": 0
},
"value": "./bat",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 1026,
"end": 1041,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 1033,
"end": 1040,
"ctxt": 0
},
"value": "./baz",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 1042,
"end": 1057,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 1049,
"end": 1056,
"ctxt": 0
},
"value": "./bar",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
},
{
"type": "ImportDeclaration",
"span": {
"start": 1058,
"end": 1074,
"ctxt": 0
},
"specifiers": [],
"source": {
"type": "StringLiteral",
"span": {
"start": 1065,
"end": 1073,
"ctxt": 0
},
"value": "./bar2",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"typeOnly": false,
"asserts": null
}
],
"interpreter": null
}