{ "type": "Program", "statements": [ { "type": "ClassDeclaration", "definition": { "id": { "type": "Identifier", "name": "Tup", "decorators": [], "loc": { "start": { "line": 17, "column": 7 }, "end": { "line": 17, "column": 10 } } }, "typeParameters": { "type": "TSTypeParameterDeclaration", "params": [ { "type": "TSTypeParameter", "name": { "type": "Identifier", "name": "A", "decorators": [], "loc": { "start": { "line": 17, "column": 11 }, "end": { "line": 17, "column": 12 } } }, "loc": { "start": { "line": 17, "column": 11 }, "end": { "line": 17, "column": 13 } } }, { "type": "TSTypeParameter", "name": { "type": "Identifier", "name": "B", "decorators": [], "loc": { "start": { "line": 17, "column": 14 }, "end": { "line": 17, "column": 15 } } }, "loc": { "start": { "line": 17, "column": 14 }, "end": { "line": 17, "column": 16 } } }, { "type": "TSTypeParameter", "name": { "type": "Identifier", "name": "C", "decorators": [], "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 18 } } }, "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 19 } } } ], "loc": { "start": { "line": 17, "column": 10 }, "end": { "line": 17, "column": 19 } } }, "superClass": null, "implements": [], "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "constructor", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "kind": "constructor", "static": false, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "constructor", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "generator": false, "async": false, "expression": false, "params": [], "body": { "type": "BlockStatement", "statements": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 17, "column": 22 }, "end": { "line": 17, "column": 22 } } } ], "loc": { "start": { "line": 17, "column": 20 }, "end": { "line": 17, "column": 22 } } }, "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 17, "column": 22 } } }, { "type": "ClassDeclaration", "definition": { "id": { "type": "Identifier", "name": "ETSGLOBAL", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "superClass": null, "implements": [], "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "_$init$_", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "_$init$_", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "generator": false, "async": false, "expression": false, "params": [], "body": { "type": "BlockStatement", "statements": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "foo", "decorators": [], "loc": { "start": { "line": 16, "column": 10 }, "end": { "line": 16, "column": 13 } } }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "foo", "decorators": [], "loc": { "start": { "line": 16, "column": 10 }, "end": { "line": 16, "column": 13 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "x", "typeAnnotation": { "type": "ETSFunctionType", "params": [], "returnType": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "T", "decorators": [], "loc": { "start": { "line": 16, "column": 26 }, "end": { "line": 16, "column": 27 } } }, "loc": { "start": { "line": 16, "column": 26 }, "end": { "line": 16, "column": 28 } } }, "loc": { "start": { "line": 16, "column": 26 }, "end": { "line": 16, "column": 28 } } }, "loc": { "start": { "line": 16, "column": 20 }, "end": { "line": 16, "column": 28 } } }, "decorators": [], "loc": { "start": { "line": 16, "column": 17 }, "end": { "line": 16, "column": 28 } } }, "loc": { "start": { "line": 16, "column": 17 }, "end": { "line": 16, "column": 28 } } } ], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 16, "column": 30 }, "end": { "line": 16, "column": 34 } } }, "typeParameters": { "type": "TSTypeParameterDeclaration", "params": [ { "type": "TSTypeParameter", "name": { "type": "Identifier", "name": "T", "decorators": [], "loc": { "start": { "line": 16, "column": 14 }, "end": { "line": 16, "column": 15 } } }, "loc": { "start": { "line": 16, "column": 14 }, "end": { "line": 16, "column": 16 } } } ], "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 16 } } }, "body": { "type": "BlockStatement", "statements": [], "loc": { "start": { "line": 16, "column": 35 }, "end": { "line": 16, "column": 37 } } }, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 37 } } }, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 37 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 16, "column": 1 }, "end": { "line": 16, "column": 37 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "main", "decorators": [], "loc": { "start": { "line": 18, "column": 10 }, "end": { "line": 18, "column": 14 } } }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "main", "decorators": [], "loc": { "start": { "line": 18, "column": 10 }, "end": { "line": 18, "column": 14 } } }, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 18, "column": 18 }, "end": { "line": 18, "column": 22 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "foo", "decorators": [], "loc": { "start": { "line": 19, "column": 3 }, "end": { "line": 19, "column": 6 } } }, "arguments": [ { "type": "ArrowFunctionExpression", "function": { "type": "ScriptFunction", "id": null, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Tup", "decorators": [], "loc": { "start": { "line": 19, "column": 40 }, "end": { "line": 19, "column": 43 } } }, "typeParams": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "number", "decorators": [], "loc": { "start": { "line": 19, "column": 44 }, "end": { "line": 19, "column": 50 } } }, "loc": { "start": { "line": 19, "column": 44 }, "end": { "line": 19, "column": 51 } } }, "loc": { "start": { "line": 19, "column": 44 }, "end": { "line": 19, "column": 51 } } }, { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "String", "decorators": [], "loc": { "start": { "line": 19, "column": 52 }, "end": { "line": 19, "column": 58 } } }, "loc": { "start": { "line": 19, "column": 52 }, "end": { "line": 19, "column": 59 } } }, "loc": { "start": { "line": 19, "column": 52 }, "end": { "line": 19, "column": 59 } } }, { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Double", "decorators": [], "loc": { "start": { "line": 19, "column": 60 }, "end": { "line": 19, "column": 66 } } }, "loc": { "start": { "line": 19, "column": 60 }, "end": { "line": 19, "column": 67 } } }, "loc": { "start": { "line": 19, "column": 60 }, "end": { "line": 19, "column": 67 } } } ], "loc": { "start": { "line": 19, "column": 43 }, "end": { "line": 19, "column": 67 } } }, "loc": { "start": { "line": 19, "column": 40 }, "end": { "line": 19, "column": 70 } } }, "loc": { "start": { "line": 19, "column": 40 }, "end": { "line": 19, "column": 70 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "ThrowStatement", "argument": { "type": "ETSNewClassInstanceExpression", "typeReference": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Error", "decorators": [], "loc": { "start": { "line": 19, "column": 83 }, "end": { "line": 19, "column": 88 } } }, "loc": { "start": { "line": 19, "column": 83 }, "end": { "line": 19, "column": 89 } } }, "loc": { "start": { "line": 19, "column": 83 }, "end": { "line": 19, "column": 89 } } }, "arguments": [], "loc": { "start": { "line": 19, "column": 79 }, "end": { "line": 19, "column": 92 } } }, "loc": { "start": { "line": 19, "column": 73 }, "end": { "line": 19, "column": 92 } } } ], "loc": { "start": { "line": 19, "column": 71 }, "end": { "line": 19, "column": 92 } } }, "loc": { "start": { "line": 19, "column": 36 }, "end": { "line": 19, "column": 92 } } }, "loc": { "start": { "line": 19, "column": 36 }, "end": { "line": 19, "column": 92 } } } ], "optional": false, "typeParameters": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Tup", "decorators": [], "loc": { "start": { "line": 19, "column": 7 }, "end": { "line": 19, "column": 10 } } }, "typeParams": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "number", "decorators": [], "loc": { "start": { "line": 19, "column": 11 }, "end": { "line": 19, "column": 17 } } }, "loc": { "start": { "line": 19, "column": 11 }, "end": { "line": 19, "column": 18 } } }, "loc": { "start": { "line": 19, "column": 11 }, "end": { "line": 19, "column": 18 } } }, { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "String", "decorators": [], "loc": { "start": { "line": 19, "column": 19 }, "end": { "line": 19, "column": 25 } } }, "loc": { "start": { "line": 19, "column": 19 }, "end": { "line": 19, "column": 26 } } }, "loc": { "start": { "line": 19, "column": 19 }, "end": { "line": 19, "column": 26 } } }, { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Double", "decorators": [], "loc": { "start": { "line": 19, "column": 27 }, "end": { "line": 19, "column": 33 } } }, "loc": { "start": { "line": 19, "column": 27 }, "end": { "line": 19, "column": 35 } } }, "loc": { "start": { "line": 19, "column": 27 }, "end": { "line": 19, "column": 35 } } } ], "loc": { "start": { "line": 19, "column": 10 }, "end": { "line": 19, "column": 35 } } }, "loc": { "start": { "line": 19, "column": 7 }, "end": { "line": 19, "column": 35 } } }, "loc": { "start": { "line": 19, "column": 7 }, "end": { "line": 19, "column": 35 } } } ], "loc": { "start": { "line": 19, "column": 6 }, "end": { "line": 19, "column": 35 } } }, "loc": { "start": { "line": 19, "column": 3 }, "end": { "line": 19, "column": 93 } } }, "loc": { "start": { "line": 19, "column": 3 }, "end": { "line": 19, "column": 94 } } } ], "loc": { "start": { "line": 18, "column": 23 }, "end": { "line": 20, "column": 2 } } }, "loc": { "start": { "line": 18, "column": 14 }, "end": { "line": 20, "column": 2 } } }, "loc": { "start": { "line": 18, "column": 14 }, "end": { "line": 20, "column": 2 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 20, "column": 2 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 22, "column": 1 } } }