swc/crates/swc_ecma_parser/tests/tsc/ambientDeclarations.json
2022-02-04 17:08:38 +09:00

1893 lines
43 KiB
JSON

{
"type": "Script",
"span": {
"start": 44,
"end": 1519,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 44,
"end": 58,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 56,
"end": 57,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 56,
"end": 57,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 101,
"end": 123,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 113,
"end": 122,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 113,
"end": 114,
"ctxt": 0
},
"value": "m",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 114,
"end": 122,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 116,
"end": 122,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 187,
"end": 190,
"ctxt": 0
},
"value": "fn1",
"optional": false
},
"declare": true,
"params": [],
"decorators": [],
"span": {
"start": 170,
"end": 193,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 254,
"end": 257,
"ctxt": 0
},
"value": "fn2",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 258,
"end": 267,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 258,
"end": 267,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 259,
"end": 267,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 261,
"end": 267,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 237,
"end": 277,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 268,
"end": 276,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 270,
"end": 276,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 337,
"end": 340,
"ctxt": 0
},
"value": "fn3",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 341,
"end": 350,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 341,
"end": 350,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 342,
"end": 350,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 344,
"end": 350,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 320,
"end": 360,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 351,
"end": 359,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 353,
"end": 359,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 378,
"end": 381,
"ctxt": 0
},
"value": "fn4",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 382,
"end": 391,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 382,
"end": 391,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 383,
"end": 391,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 385,
"end": 391,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 393,
"end": 402,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 393,
"end": 402,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 394,
"end": 402,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 396,
"end": 402,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 361,
"end": 412,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 403,
"end": 411,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 405,
"end": 411,
"ctxt": 0
},
"kind": "string"
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 476,
"end": 479,
"ctxt": 0
},
"value": "fn5",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 480,
"end": 481,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 480,
"end": 481,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
},
{
"type": "Parameter",
"span": {
"start": 483,
"end": 485,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 483,
"end": 484,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 459,
"end": 487,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 505,
"end": 508,
"ctxt": 0
},
"value": "fn6",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 509,
"end": 511,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 509,
"end": 510,
"ctxt": 0
},
"value": "e",
"optional": true,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 488,
"end": 513,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 531,
"end": 534,
"ctxt": 0
},
"value": "fn7",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 535,
"end": 536,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 535,
"end": 536,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
},
{
"type": "Parameter",
"span": {
"start": 538,
"end": 540,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 538,
"end": 539,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": null
}
},
{
"type": "Parameter",
"span": {
"start": 542,
"end": 546,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 542,
"end": 546,
"ctxt": 0
},
"rest": {
"start": 542,
"end": 545,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 545,
"end": 546,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 514,
"end": 548,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 566,
"end": 569,
"ctxt": 0
},
"value": "fn8",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 570,
"end": 572,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 570,
"end": 571,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": null
}
},
{
"type": "Parameter",
"span": {
"start": 574,
"end": 588,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 574,
"end": 588,
"ctxt": 0
},
"rest": {
"start": 574,
"end": 577,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 577,
"end": 578,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 578,
"end": 588,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 580,
"end": 588,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 580,
"end": 586,
"ctxt": 0
},
"kind": "number"
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 549,
"end": 590,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 608,
"end": 611,
"ctxt": 0
},
"value": "fn9",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 612,
"end": 622,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 612,
"end": 622,
"ctxt": 0
},
"rest": {
"start": 612,
"end": 615,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 615,
"end": 616,
"ctxt": 0
},
"value": "q",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 616,
"end": 622,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 618,
"end": 622,
"ctxt": 0
},
"elemType": {
"type": "TsTypeLiteral",
"span": {
"start": 618,
"end": 620,
"ctxt": 0
},
"members": []
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 591,
"end": 624,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 642,
"end": 646,
"ctxt": 0
},
"value": "fn10",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 650,
"end": 659,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 650,
"end": 659,
"ctxt": 0
},
"rest": {
"start": 650,
"end": 653,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 653,
"end": 654,
"ctxt": 0
},
"value": "q",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 654,
"end": 659,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 656,
"end": 659,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 656,
"end": 657,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 656,
"end": 657,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 625,
"end": 661,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 646,
"end": 649,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 647,
"end": 648,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 647,
"end": 648,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"returnType": null
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 694,
"end": 697,
"ctxt": 0
},
"value": "cls",
"optional": false
},
"declare": true,
"span": {
"start": 680,
"end": 827,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 704,
"end": 718,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 704,
"end": 715,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": null,
"accessibility": null,
"isOptional": false
},
{
"type": "ClassMethod",
"span": {
"start": 723,
"end": 737,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 723,
"end": 729,
"ctxt": 0
},
"value": "method",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 723,
"end": 737,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 731,
"end": 736,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 733,
"end": 736,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 733,
"end": 736,
"ctxt": 0
},
"value": "cls",
"optional": false
},
"typeParams": null
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 742,
"end": 767,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 749,
"end": 755,
"ctxt": 0
},
"value": "static",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 756,
"end": 757,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 756,
"end": 757,
"ctxt": 0
},
"value": "p",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 742,
"end": 767,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 758,
"end": 766,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 760,
"end": 766,
"ctxt": 0
},
"kind": "number"
}
}
},
"kind": "method",
"isStatic": true,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassProperty",
"span": {
"start": 772,
"end": 781,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 779,
"end": 780,
"ctxt": 0
},
"value": "q",
"optional": false
},
"value": null,
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 786,
"end": 799,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 794,
"end": 796,
"ctxt": 0
},
"value": "fn",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 786,
"end": 799,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": "private",
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 804,
"end": 825,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 819,
"end": 822,
"ctxt": 0
},
"value": "fns",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 804,
"end": 825,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": true,
"accessibility": "private",
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 845,
"end": 884,
"ctxt": 0
},
"declare": true,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 858,
"end": 860,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 867,
"end": 868,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 867,
"end": 868,
"ctxt": 0
},
"value": "x",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 874,
"end": 875,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 874,
"end": 875,
"ctxt": 0
},
"value": "y",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 881,
"end": 882,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 881,
"end": 882,
"ctxt": 0
},
"value": "z",
"optional": false
},
"init": null
}
]
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 935,
"end": 996,
"ctxt": 0
},
"declare": true,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 948,
"end": 950,
"ctxt": 0
},
"value": "E2",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 957,
"end": 958,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 957,
"end": 958,
"ctxt": 0
},
"value": "q",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 964,
"end": 969,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 964,
"end": 965,
"ctxt": 0
},
"value": "a",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 968,
"end": 969,
"ctxt": 0
},
"value": 1.0
}
},
{
"type": "TsEnumMember",
"span": {
"start": 975,
"end": 976,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 975,
"end": 976,
"ctxt": 0
},
"value": "b",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 982,
"end": 987,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 982,
"end": 983,
"ctxt": 0
},
"value": "c",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 986,
"end": 987,
"ctxt": 0
},
"value": 2.0
}
},
{
"type": "TsEnumMember",
"span": {
"start": 993,
"end": 994,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 993,
"end": 994,
"ctxt": 0
},
"value": "d",
"optional": false
},
"init": null
}
]
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 1073,
"end": 1098,
"ctxt": 0
},
"declare": true,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 1086,
"end": 1088,
"ctxt": 0
},
"value": "E3",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 1095,
"end": 1096,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1095,
"end": 1096,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": null
}
]
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 1099,
"end": 1131,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 1114,
"end": 1116,
"ctxt": 0
},
"value": "E3",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 1117,
"end": 1131,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 1123,
"end": 1129,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1127,
"end": 1128,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1127,
"end": 1128,
"ctxt": 0
},
"value": "B",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1132,
"end": 1145,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1136,
"end": 1144,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1136,
"end": 1137,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1140,
"end": 1144,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1140,
"end": 1142,
"ctxt": 0
},
"value": "E3",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1143,
"end": 1144,
"ctxt": 0
},
"value": "B",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 1165,
"end": 1224,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 1180,
"end": 1182,
"ctxt": 0
},
"value": "M1",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 1183,
"end": 1224,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 1189,
"end": 1195,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1193,
"end": 1194,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1193,
"end": 1194,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 1209,
"end": 1211,
"ctxt": 0
},
"value": "fn",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 1200,
"end": 1222,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 1213,
"end": 1221,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1215,
"end": 1221,
"ctxt": 0
},
"kind": "number"
}
}
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1303,
"end": 1316,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1307,
"end": 1315,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1307,
"end": 1308,
"ctxt": 0
},
"value": "p",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1311,
"end": 1315,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1311,
"end": 1313,
"ctxt": 0
},
"value": "M1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1314,
"end": 1315,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1317,
"end": 1333,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1321,
"end": 1332,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1321,
"end": 1322,
"ctxt": 0
},
"value": "q",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1325,
"end": 1332,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 1325,
"end": 1330,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1325,
"end": 1327,
"ctxt": 0
},
"value": "M1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1328,
"end": 1330,
"ctxt": 0
},
"value": "fn",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 1478,
"end": 1519,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "StringLiteral",
"span": {
"start": 1493,
"end": 1504,
"ctxt": 0
},
"value": "external1",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 1505,
"end": 1519,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 1511,
"end": 1517,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1515,
"end": 1516,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1515,
"end": 1516,
"ctxt": 0
},
"value": "q",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
}
]
}
}
],
"interpreter": null
}