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

2657 lines
67 KiB
JSON

{
"type": "Script",
"span": {
"start": 32,
"end": 1156,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 32,
"end": 63,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 42,
"end": 43,
"ctxt": 0
},
"value": "I",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 44,
"end": 63,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 50,
"end": 61,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 50,
"end": 52,
"ctxt": 0
},
"value": "id",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 52,
"end": 60,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 54,
"end": 60,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
}
]
}
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 71,
"end": 72,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 65,
"end": 105,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 92,
"end": 103,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 92,
"end": 94,
"ctxt": 0
},
"value": "id",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 94,
"end": 102,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 96,
"end": 102,
"ctxt": 0
},
"kind": "number"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": [
{
"type": "TsExpressionWithTypeArguments",
"span": {
"start": 84,
"end": 85,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 84,
"end": 85,
"ctxt": 0
},
"value": "I",
"optional": false
},
"typeArguments": null
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 113,
"end": 114,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"span": {
"start": 107,
"end": 175,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 123,
"end": 133,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 123,
"end": 129,
"ctxt": 0
},
"value": "source",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 129,
"end": 132,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 131,
"end": 132,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 131,
"end": 132,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 138,
"end": 152,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 138,
"end": 145,
"ctxt": 0
},
"value": "recurse",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 145,
"end": 151,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 147,
"end": 151,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 147,
"end": 148,
"ctxt": 0
},
"value": "D",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 148,
"end": 151,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 149,
"end": 150,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 149,
"end": 150,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 157,
"end": 173,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 157,
"end": 164,
"ctxt": 0
},
"value": "wrapped",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 164,
"end": 173,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 166,
"end": 173,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 166,
"end": 167,
"ctxt": 0
},
"value": "D",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 167,
"end": 173,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 168,
"end": 172,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 168,
"end": 169,
"ctxt": 0
},
"value": "D",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 169,
"end": 172,
"ctxt": 0
},
"params": [
{
"type": "TsTypeReference",
"span": {
"start": 170,
"end": 171,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 170,
"end": 171,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
]
}
}
]
}
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 114,
"end": 117,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 115,
"end": 116,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 115,
"end": 116,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"superTypeParams": null,
"implements": []
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 186,
"end": 187,
"ctxt": 0
},
"value": "F",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 188,
"end": 197,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 188,
"end": 197,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 189,
"end": 197,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 191,
"end": 197,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 177,
"end": 221,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 207,
"end": 221,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 209,
"end": 219,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 216,
"end": 218,
"ctxt": 0
},
"value": 42.0
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 198,
"end": 206,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 200,
"end": 206,
"ctxt": 0
},
"kind": "number"
}
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 223,
"end": 352,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 230,
"end": 231,
"ctxt": 0
},
"value": "M",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 232,
"end": 352,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 238,
"end": 282,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 251,
"end": 252,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"span": {
"start": 245,
"end": 282,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 263,
"end": 276,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 263,
"end": 267,
"ctxt": 0
},
"value": "name",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 267,
"end": 275,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 269,
"end": 275,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 288,
"end": 350,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 304,
"end": 306,
"ctxt": 0
},
"value": "F2",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 307,
"end": 316,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 307,
"end": 316,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 308,
"end": 316,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 310,
"end": 316,
"ctxt": 0
},
"kind": "number"
}
}
}
}
],
"decorators": [],
"span": {
"start": 295,
"end": 350,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 326,
"end": 350,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 328,
"end": 348,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 335,
"end": 347,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 335,
"end": 345,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 335,
"end": 336,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 337,
"end": 345,
"ctxt": 0
},
"value": "toString",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 317,
"end": 325,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 319,
"end": 325,
"ctxt": 0
},
"kind": "string"
}
}
}
}
]
}
},
{
"type": "ForStatement",
"span": {
"start": 354,
"end": 388,
"ctxt": 0
},
"init": {
"type": "VariableDeclaration",
"span": {
"start": 358,
"end": 383,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 362,
"end": 383,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 362,
"end": 369,
"ctxt": 0
},
"value": "aNumber",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 369,
"end": 377,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 371,
"end": 377,
"ctxt": 0
},
"kind": "number"
}
}
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 380,
"end": 383,
"ctxt": 0
},
"value": 9.9
},
"definite": false
}
]
},
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 386,
"end": 388,
"ctxt": 0
},
"stmts": []
}
},
{
"type": "ForStatement",
"span": {
"start": 390,
"end": 439,
"ctxt": 0
},
"init": {
"type": "VariableDeclaration",
"span": {
"start": 394,
"end": 434,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 398,
"end": 434,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 398,
"end": 405,
"ctxt": 0
},
"value": "aString",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 405,
"end": 413,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 407,
"end": 413,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": {
"type": "StringLiteral",
"span": {
"start": 416,
"end": 434,
"ctxt": 0
},
"value": "this is a string",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"definite": false
}
]
},
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 437,
"end": 439,
"ctxt": 0
},
"stmts": []
}
},
{
"type": "ForStatement",
"span": {
"start": 440,
"end": 479,
"ctxt": 0
},
"init": {
"type": "VariableDeclaration",
"span": {
"start": 444,
"end": 474,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 448,
"end": 474,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 448,
"end": 453,
"ctxt": 0
},
"value": "aDate",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 453,
"end": 459,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 455,
"end": 459,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 455,
"end": 459,
"ctxt": 0
},
"value": "Date",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "NewExpression",
"span": {
"start": 462,
"end": 474,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 466,
"end": 470,
"ctxt": 0
},
"value": "Date",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 471,
"end": 473,
"ctxt": 0
},
"value": 12.0
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 477,
"end": 479,
"ctxt": 0
},
"stmts": []
}
},
{
"type": "ForStatement",
"span": {
"start": 480,
"end": 524,
"ctxt": 0
},
"init": {
"type": "VariableDeclaration",
"span": {
"start": 484,
"end": 519,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 488,
"end": 519,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 488,
"end": 496,
"ctxt": 0
},
"value": "anObject",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 496,
"end": 504,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 498,
"end": 504,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 498,
"end": 504,
"ctxt": 0
},
"value": "Object",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "NewExpression",
"span": {
"start": 507,
"end": 519,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 511,
"end": 517,
"ctxt": 0
},
"value": "Object",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 522,
"end": 524,
"ctxt": 0
},
"stmts": []
}
},
{
"type": "ForStatement",
"span": {
"start": 526,
"end": 556,
"ctxt": 0
},
"init": {
"type": "VariableDeclaration",
"span": {
"start": 530,
"end": 551,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 534,
"end": 551,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 534,
"end": 539,
"ctxt": 0
},
"value": "anAny",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 539,
"end": 544,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 541,
"end": 544,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": {
"type": "NullLiteral",
"span": {
"start": 547,
"end": 551,
"ctxt": 0
}
},
"definite": false
}
]
},
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 554,
"end": 556,
"ctxt": 0
},
"stmts": []
}
},
{
"type": "ForStatement",
"span": {
"start": 557,
"end": 597,
"ctxt": 0
},
"init": {
"type": "VariableDeclaration",
"span": {
"start": 561,
"end": 592,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 565,
"end": 592,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 565,
"end": 575,
"ctxt": 0
},
"value": "aSecondAny",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 575,
"end": 580,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 577,
"end": 580,
"ctxt": 0
},
"kind": "any"
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 583,
"end": 592,
"ctxt": 0
},
"value": "undefined",
"optional": false
},
"definite": false
}
]
},
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 595,
"end": 597,
"ctxt": 0
},
"stmts": []
}
},
{
"type": "ForStatement",
"span": {
"start": 598,
"end": 634,
"ctxt": 0
},
"init": {
"type": "VariableDeclaration",
"span": {
"start": 602,
"end": 629,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 606,
"end": 629,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 606,
"end": 611,
"ctxt": 0
},
"value": "aVoid",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 611,
"end": 617,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 613,
"end": 617,
"ctxt": 0
},
"kind": "void"
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 620,
"end": 629,
"ctxt": 0
},
"value": "undefined",
"optional": false
},
"definite": false
}
]
},
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 632,
"end": 634,
"ctxt": 0
},
"stmts": []
}
},
{
"type": "ForStatement",
"span": {
"start": 636,
"end": 673,
"ctxt": 0
},
"init": {
"type": "VariableDeclaration",
"span": {
"start": 640,
"end": 668,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 644,
"end": 668,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 644,
"end": 655,
"ctxt": 0
},
"value": "anInterface",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 655,
"end": 658,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 657,
"end": 658,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 657,
"end": 658,
"ctxt": 0
},
"value": "I",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "NewExpression",
"span": {
"start": 661,
"end": 668,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 665,
"end": 666,
"ctxt": 0
},
"value": "C",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 671,
"end": 673,
"ctxt": 0
},
"stmts": []
}
},
{
"type": "ForStatement",
"span": {
"start": 674,
"end": 706,
"ctxt": 0
},
"init": {
"type": "VariableDeclaration",
"span": {
"start": 678,
"end": 701,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 682,
"end": 701,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 682,
"end": 688,
"ctxt": 0
},
"value": "aClass",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 688,
"end": 691,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 690,
"end": 691,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 690,
"end": 691,
"ctxt": 0
},
"value": "C",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "NewExpression",
"span": {
"start": 694,
"end": 701,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 698,
"end": 699,
"ctxt": 0
},
"value": "C",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 704,
"end": 706,
"ctxt": 0
},
"stmts": []
}
},
{
"type": "ForStatement",
"span": {
"start": 707,
"end": 762,
"ctxt": 0
},
"init": {
"type": "VariableDeclaration",
"span": {
"start": 711,
"end": 757,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 715,
"end": 757,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 715,
"end": 728,
"ctxt": 0
},
"value": "aGenericClass",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 728,
"end": 739,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 730,
"end": 739,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 730,
"end": 731,
"ctxt": 0
},
"value": "D",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 731,
"end": 739,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 732,
"end": 738,
"ctxt": 0
},
"kind": "string"
}
]
}
}
}
},
"init": {
"type": "NewExpression",
"span": {
"start": 742,
"end": 757,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 746,
"end": 747,
"ctxt": 0
},
"value": "D",
"optional": false
},
"arguments": [],
"typeArguments": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 747,
"end": 755,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 748,
"end": 754,
"ctxt": 0
},
"kind": "string"
}
]
}
},
"definite": false
}
]
},
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 760,
"end": 762,
"ctxt": 0
},
"stmts": []
}
},
{
"type": "ForStatement",
"span": {
"start": 763,
"end": 807,
"ctxt": 0
},
"init": {
"type": "VariableDeclaration",
"span": {
"start": 767,
"end": 802,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 771,
"end": 802,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 771,
"end": 786,
"ctxt": 0
},
"value": "anObjectLiteral",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 786,
"end": 789,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 788,
"end": 789,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 788,
"end": 789,
"ctxt": 0
},
"value": "I",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 792,
"end": 802,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 794,
"end": 796,
"ctxt": 0
},
"value": "id",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 798,
"end": 800,
"ctxt": 0
},
"value": 12.0
}
}
]
},
"definite": false
}
]
},
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 805,
"end": 807,
"ctxt": 0
},
"stmts": []
}
},
{
"type": "ForStatement",
"span": {
"start": 808,
"end": 867,
"ctxt": 0
},
"init": {
"type": "VariableDeclaration",
"span": {
"start": 812,
"end": 862,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 816,
"end": 862,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 816,
"end": 836,
"ctxt": 0
},
"value": "anOtherObjectLiteral",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 836,
"end": 852,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 838,
"end": 852,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 840,
"end": 850,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 840,
"end": 842,
"ctxt": 0
},
"value": "id",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 842,
"end": 850,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 844,
"end": 850,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
}
]
}
}
},
"init": {
"type": "NewExpression",
"span": {
"start": 855,
"end": 862,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 859,
"end": 860,
"ctxt": 0
},
"value": "C",
"optional": false
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 865,
"end": 867,
"ctxt": 0
},
"stmts": []
}
},
{
"type": "ForStatement",
"span": {
"start": 869,
"end": 905,
"ctxt": 0
},
"init": {
"type": "VariableDeclaration",
"span": {
"start": 873,
"end": 900,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 877,
"end": 900,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 877,
"end": 886,
"ctxt": 0
},
"value": "aFunction",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 886,
"end": 896,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 888,
"end": 896,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 895,
"end": 896,
"ctxt": 0
},
"value": "F",
"optional": false
}
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 899,
"end": 900,
"ctxt": 0
},
"value": "F",
"optional": false
},
"definite": false
}
]
},
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 903,
"end": 905,
"ctxt": 0
},
"stmts": []
}
},
{
"type": "ForStatement",
"span": {
"start": 906,
"end": 961,
"ctxt": 0
},
"init": {
"type": "VariableDeclaration",
"span": {
"start": 910,
"end": 956,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 914,
"end": 956,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 914,
"end": 929,
"ctxt": 0
},
"value": "anOtherFunction",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 929,
"end": 952,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsFunctionType",
"span": {
"start": 931,
"end": 952,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 932,
"end": 941,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 933,
"end": 941,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 935,
"end": 941,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 943,
"end": 952,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 946,
"end": 952,
"ctxt": 0
},
"kind": "number"
}
}
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 955,
"end": 956,
"ctxt": 0
},
"value": "F",
"optional": false
},
"definite": false
}
]
},
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 959,
"end": 961,
"ctxt": 0
},
"stmts": []
}
},
{
"type": "ForStatement",
"span": {
"start": 962,
"end": 1003,
"ctxt": 0
},
"init": {
"type": "VariableDeclaration",
"span": {
"start": 966,
"end": 998,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 970,
"end": 998,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 970,
"end": 977,
"ctxt": 0
},
"value": "aLambda",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 977,
"end": 987,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 979,
"end": 987,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 986,
"end": 987,
"ctxt": 0
},
"value": "F",
"optional": false
}
}
}
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 990,
"end": 998,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 991,
"end": 992,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "NumericLiteral",
"span": {
"start": 997,
"end": 998,
"ctxt": 0
},
"value": 2.0
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 1001,
"end": 1003,
"ctxt": 0
},
"stmts": []
}
},
{
"type": "ForStatement",
"span": {
"start": 1005,
"end": 1039,
"ctxt": 0
},
"init": {
"type": "VariableDeclaration",
"span": {
"start": 1009,
"end": 1034,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1013,
"end": 1034,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1013,
"end": 1020,
"ctxt": 0
},
"value": "aModule",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1020,
"end": 1030,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 1022,
"end": 1030,
"ctxt": 0
},
"exprName": {
"type": "Identifier",
"span": {
"start": 1029,
"end": 1030,
"ctxt": 0
},
"value": "M",
"optional": false
}
}
}
},
"init": {
"type": "Identifier",
"span": {
"start": 1033,
"end": 1034,
"ctxt": 0
},
"value": "M",
"optional": false
},
"definite": false
}
]
},
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 1037,
"end": 1039,
"ctxt": 0
},
"stmts": []
}
},
{
"type": "ForStatement",
"span": {
"start": 1040,
"end": 1084,
"ctxt": 0
},
"init": {
"type": "VariableDeclaration",
"span": {
"start": 1044,
"end": 1079,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1048,
"end": 1079,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1048,
"end": 1062,
"ctxt": 0
},
"value": "aClassInModule",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1062,
"end": 1067,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 1064,
"end": 1067,
"ctxt": 0
},
"typeName": {
"type": "TsQualifiedName",
"left": {
"type": "Identifier",
"span": {
"start": 1064,
"end": 1065,
"ctxt": 0
},
"value": "M",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 1066,
"end": 1067,
"ctxt": 0
},
"value": "A",
"optional": false
}
},
"typeParams": null
}
}
},
"init": {
"type": "NewExpression",
"span": {
"start": 1070,
"end": 1079,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 1074,
"end": 1077,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1074,
"end": 1075,
"ctxt": 0
},
"value": "M",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1076,
"end": 1077,
"ctxt": 0
},
"value": "A",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 1082,
"end": 1084,
"ctxt": 0
},
"stmts": []
}
},
{
"type": "ForStatement",
"span": {
"start": 1085,
"end": 1156,
"ctxt": 0
},
"init": {
"type": "VariableDeclaration",
"span": {
"start": 1089,
"end": 1151,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1093,
"end": 1151,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1093,
"end": 1110,
"ctxt": 0
},
"value": "aFunctionInModule",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 1110,
"end": 1123,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeQuery",
"span": {
"start": 1112,
"end": 1123,
"ctxt": 0
},
"exprName": {
"type": "TsQualifiedName",
"left": {
"type": "Identifier",
"span": {
"start": 1119,
"end": 1120,
"ctxt": 0
},
"value": "M",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 1121,
"end": 1123,
"ctxt": 0
},
"value": "F2",
"optional": false
}
}
}
}
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 1126,
"end": 1151,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 1127,
"end": 1128,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "StringLiteral",
"span": {
"start": 1133,
"end": 1151,
"ctxt": 0
},
"value": "this is a string",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
"test": null,
"update": null,
"body": {
"type": "BlockStatement",
"span": {
"start": 1154,
"end": 1156,
"ctxt": 0
},
"stmts": []
}
}
],
"interpreter": null
}