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

1894 lines
43 KiB
JSON

{
"type": "Script",
"span": {
"start": 45,
"end": 1520,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 45,
"end": 59,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 57,
"end": 58,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 57,
"end": 58,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 102,
"end": 124,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 114,
"end": 123,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 114,
"end": 115,
"ctxt": 0
},
"value": "m",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 115,
"end": 123,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 117,
"end": 123,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 188,
"end": 191,
"ctxt": 0
},
"value": "fn1",
"optional": false
},
"declare": true,
"params": [],
"decorators": [],
"span": {
"start": 171,
"end": 194,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 255,
"end": 258,
"ctxt": 0
},
"value": "fn2",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 259,
"end": 268,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 259,
"end": 268,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 260,
"end": 268,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 262,
"end": 268,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 238,
"end": 278,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 269,
"end": 277,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 271,
"end": 277,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 338,
"end": 341,
"ctxt": 0
},
"value": "fn3",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 342,
"end": 351,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 342,
"end": 351,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 343,
"end": 351,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 345,
"end": 351,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 321,
"end": 361,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 352,
"end": 360,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 354,
"end": 360,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 379,
"end": 382,
"ctxt": 0
},
"value": "fn4",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 383,
"end": 392,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 383,
"end": 392,
"ctxt": 0
},
"value": "n",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 384,
"end": 392,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 386,
"end": 392,
"ctxt": 0
},
"kind": "number"
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 394,
"end": 403,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 394,
"end": 403,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 395,
"end": 403,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 397,
"end": 403,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 362,
"end": 413,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 404,
"end": 412,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 406,
"end": 412,
"ctxt": 0
},
"kind": "string"
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 477,
"end": 480,
"ctxt": 0
},
"value": "fn5",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 481,
"end": 482,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 481,
"end": 482,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
},
{
"type": "Parameter",
"span": {
"start": 484,
"end": 486,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 484,
"end": 485,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 460,
"end": 488,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 506,
"end": 509,
"ctxt": 0
},
"value": "fn6",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 510,
"end": 512,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 510,
"end": 511,
"ctxt": 0
},
"value": "e",
"optional": true,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 489,
"end": 514,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 532,
"end": 535,
"ctxt": 0
},
"value": "fn7",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 536,
"end": 537,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 536,
"end": 537,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
},
{
"type": "Parameter",
"span": {
"start": 539,
"end": 541,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 539,
"end": 540,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": null
}
},
{
"type": "Parameter",
"span": {
"start": 543,
"end": 547,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 543,
"end": 547,
"ctxt": 0
},
"rest": {
"start": 543,
"end": 546,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 546,
"end": 547,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 515,
"end": 549,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 567,
"end": 570,
"ctxt": 0
},
"value": "fn8",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 571,
"end": 573,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 571,
"end": 572,
"ctxt": 0
},
"value": "y",
"optional": true,
"typeAnnotation": null
}
},
{
"type": "Parameter",
"span": {
"start": 575,
"end": 589,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 575,
"end": 589,
"ctxt": 0
},
"rest": {
"start": 575,
"end": 578,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 578,
"end": 579,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 579,
"end": 589,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 581,
"end": 589,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 581,
"end": 587,
"ctxt": 0
},
"kind": "number"
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 550,
"end": 591,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 609,
"end": 612,
"ctxt": 0
},
"value": "fn9",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 613,
"end": 623,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 613,
"end": 623,
"ctxt": 0
},
"rest": {
"start": 613,
"end": 616,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 616,
"end": 617,
"ctxt": 0
},
"value": "q",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 617,
"end": 623,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 619,
"end": 623,
"ctxt": 0
},
"elemType": {
"type": "TsTypeLiteral",
"span": {
"start": 619,
"end": 621,
"ctxt": 0
},
"members": []
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 592,
"end": 625,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 643,
"end": 647,
"ctxt": 0
},
"value": "fn10",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 651,
"end": 660,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "RestElement",
"span": {
"start": 651,
"end": 660,
"ctxt": 0
},
"rest": {
"start": 651,
"end": 654,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 654,
"end": 655,
"ctxt": 0
},
"value": "q",
"optional": false,
"typeAnnotation": null
},
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 655,
"end": 660,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 657,
"end": 660,
"ctxt": 0
},
"elemType": {
"type": "TsTypeReference",
"span": {
"start": 657,
"end": 658,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 657,
"end": 658,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
}
],
"decorators": [],
"span": {
"start": 626,
"end": 662,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 647,
"end": 650,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 648,
"end": 649,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 648,
"end": 649,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": null,
"default": null
}
]
},
"returnType": null
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 695,
"end": 698,
"ctxt": 0
},
"value": "cls",
"optional": false
},
"declare": true,
"span": {
"start": 681,
"end": 828,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 705,
"end": 719,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 705,
"end": 716,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": null,
"accessibility": null,
"isOptional": false
},
{
"type": "ClassMethod",
"span": {
"start": 724,
"end": 738,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 724,
"end": 730,
"ctxt": 0
},
"value": "method",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 724,
"end": 738,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 732,
"end": 737,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 734,
"end": 737,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 734,
"end": 737,
"ctxt": 0
},
"value": "cls",
"optional": false
},
"typeParams": null
}
}
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 743,
"end": 768,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 750,
"end": 756,
"ctxt": 0
},
"value": "static",
"optional": false
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 757,
"end": 758,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 757,
"end": 758,
"ctxt": 0
},
"value": "p",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 743,
"end": 768,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 759,
"end": 767,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 761,
"end": 767,
"ctxt": 0
},
"kind": "number"
}
}
},
"kind": "method",
"isStatic": true,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassProperty",
"span": {
"start": 773,
"end": 782,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 780,
"end": 781,
"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": 787,
"end": 800,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 795,
"end": 797,
"ctxt": 0
},
"value": "fn",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 787,
"end": 800,
"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": 805,
"end": 826,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 820,
"end": 823,
"ctxt": 0
},
"value": "fns",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 805,
"end": 826,
"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": 846,
"end": 885,
"ctxt": 0
},
"declare": true,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 859,
"end": 861,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 868,
"end": 869,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 868,
"end": 869,
"ctxt": 0
},
"value": "x",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 875,
"end": 876,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 875,
"end": 876,
"ctxt": 0
},
"value": "y",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 882,
"end": 883,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 882,
"end": 883,
"ctxt": 0
},
"value": "z",
"optional": false
},
"init": null
}
]
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 936,
"end": 997,
"ctxt": 0
},
"declare": true,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 949,
"end": 951,
"ctxt": 0
},
"value": "E2",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 958,
"end": 959,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 958,
"end": 959,
"ctxt": 0
},
"value": "q",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 965,
"end": 970,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 965,
"end": 966,
"ctxt": 0
},
"value": "a",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 969,
"end": 970,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"type": "TsEnumMember",
"span": {
"start": 976,
"end": 977,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 976,
"end": 977,
"ctxt": 0
},
"value": "b",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 983,
"end": 988,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 983,
"end": 984,
"ctxt": 0
},
"value": "c",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 987,
"end": 988,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
},
{
"type": "TsEnumMember",
"span": {
"start": 994,
"end": 995,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 994,
"end": 995,
"ctxt": 0
},
"value": "d",
"optional": false
},
"init": null
}
]
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 1074,
"end": 1099,
"ctxt": 0
},
"declare": true,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 1087,
"end": 1089,
"ctxt": 0
},
"value": "E3",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 1096,
"end": 1097,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1096,
"end": 1097,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": null
}
]
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 1100,
"end": 1132,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 1115,
"end": 1117,
"ctxt": 0
},
"value": "E3",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 1118,
"end": 1132,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 1124,
"end": 1130,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1128,
"end": 1129,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1128,
"end": 1129,
"ctxt": 0
},
"value": "B",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1133,
"end": 1146,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1137,
"end": 1145,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1137,
"end": 1138,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1141,
"end": 1145,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1141,
"end": 1143,
"ctxt": 0
},
"value": "E3",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1144,
"end": 1145,
"ctxt": 0
},
"value": "B",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 1166,
"end": 1225,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 1181,
"end": 1183,
"ctxt": 0
},
"value": "M1",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 1184,
"end": 1225,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 1190,
"end": 1196,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1194,
"end": 1195,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1194,
"end": 1195,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 1210,
"end": 1212,
"ctxt": 0
},
"value": "fn",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 1201,
"end": 1223,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 1214,
"end": 1222,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 1216,
"end": 1222,
"ctxt": 0
},
"kind": "number"
}
}
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1304,
"end": 1317,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1308,
"end": 1316,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1308,
"end": 1309,
"ctxt": 0
},
"value": "p",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1312,
"end": 1316,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1312,
"end": 1314,
"ctxt": 0
},
"value": "M1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1315,
"end": 1316,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 1318,
"end": 1334,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1322,
"end": 1333,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1322,
"end": 1323,
"ctxt": 0
},
"value": "q",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 1326,
"end": 1333,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 1326,
"end": 1331,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1326,
"end": 1328,
"ctxt": 0
},
"value": "M1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1329,
"end": 1331,
"ctxt": 0
},
"value": "fn",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 1479,
"end": 1520,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "StringLiteral",
"span": {
"start": 1494,
"end": 1505,
"ctxt": 0
},
"value": "external1",
"raw": "'external1'"
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 1506,
"end": 1520,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 1512,
"end": 1518,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1516,
"end": 1517,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1516,
"end": 1517,
"ctxt": 0
},
"value": "q",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
}
]
}
}
],
"interpreter": null
}