{ "type": "Program", "statements": [ { "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", "rest parameter": { "type": "RestElement", "argument": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 16, "column": 17 }, "end": { "line": 16, "column": 18 } } }, "typeAnnotation": { "type": "TSArrayType", "elementType": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Int", "decorators": [], "loc": { "start": { "line": 16, "column": 21 }, "end": { "line": 16, "column": 24 } } }, "loc": { "start": { "line": 16, "column": 21 }, "end": { "line": 16, "column": 25 } } }, "loc": { "start": { "line": 16, "column": 21 }, "end": { "line": 16, "column": 25 } } }, "loc": { "start": { "line": 16, "column": 26 }, "end": { "line": 16, "column": 27 } } }, "loc": { "start": { "line": 16, "column": 14 }, "end": { "line": 16, "column": 27 } } }, "loc": { "start": { "line": 16, "column": 14 }, "end": { "line": 16, "column": 27 } } } ], "returnType": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Int", "decorators": [], "loc": { "start": { "line": 16, "column": 30 }, "end": { "line": 16, "column": 33 } } }, "loc": { "start": { "line": 16, "column": 30 }, "end": { "line": 17, "column": 2 } } }, "loc": { "start": { "line": 16, "column": 30 }, "end": { "line": 17, "column": 2 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "NumberLiteral", "value": 1, "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 13 } } }, "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 18, "column": 14 } } } ], "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 19, "column": 2 } } }, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 19, "column": 2 } } }, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 19, "column": 2 } } }, "overloads": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "foo", "decorators": [], "loc": { "start": { "line": 21, "column": 10 }, "end": { "line": 21, "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": 21, "column": 10 }, "end": { "line": 21, "column": 13 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Int", "decorators": [], "loc": { "start": { "line": 21, "column": 18 }, "end": { "line": 21, "column": 21 } } }, "loc": { "start": { "line": 21, "column": 18 }, "end": { "line": 21, "column": 22 } } }, "loc": { "start": { "line": 21, "column": 18 }, "end": { "line": 21, "column": 22 } } }, "decorators": [], "loc": { "start": { "line": 21, "column": 14 }, "end": { "line": 21, "column": 22 } } }, "loc": { "start": { "line": 21, "column": 14 }, "end": { "line": 21, "column": 22 } } }, { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "b", "typeAnnotation": { "type": "ETSUnionType", "types": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "String", "decorators": [], "loc": { "start": { "line": 21, "column": 28 }, "end": { "line": 21, "column": 34 } } }, "loc": { "start": { "line": 21, "column": 28 }, "end": { "line": 21, "column": 35 } } }, "loc": { "start": { "line": 21, "column": 28 }, "end": { "line": 21, "column": 35 } } }, { "type": "ETSUndefinedType", "loc": { "start": { "line": 21, "column": 24 }, "end": { "line": 21, "column": 25 } } } ], "loc": { "start": { "line": 21, "column": 28 }, "end": { "line": 21, "column": 35 } } }, "decorators": [], "loc": { "start": { "line": 21, "column": 23 }, "end": { "line": 21, "column": 35 } } }, "loc": { "start": { "line": 21, "column": 23 }, "end": { "line": 21, "column": 35 } } }, { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "c", "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Int", "decorators": [], "loc": { "start": { "line": 21, "column": 40 }, "end": { "line": 21, "column": 43 } } }, "loc": { "start": { "line": 21, "column": 40 }, "end": { "line": 21, "column": 45 } } }, "loc": { "start": { "line": 21, "column": 40 }, "end": { "line": 21, "column": 45 } } }, "decorators": [], "loc": { "start": { "line": 21, "column": 36 }, "end": { "line": 21, "column": 45 } } }, "loc": { "start": { "line": 21, "column": 36 }, "end": { "line": 21, "column": 48 } } } ], "returnType": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Int", "decorators": [], "loc": { "start": { "line": 21, "column": 52 }, "end": { "line": 21, "column": 55 } } }, "loc": { "start": { "line": 21, "column": 52 }, "end": { "line": 22, "column": 2 } } }, "loc": { "start": { "line": 21, "column": 52 }, "end": { "line": 22, "column": 2 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "NumberLiteral", "value": 2, "loc": { "start": { "line": 23, "column": 12 }, "end": { "line": 23, "column": 13 } } }, "loc": { "start": { "line": 23, "column": 5 }, "end": { "line": 23, "column": 14 } } } ], "loc": { "start": { "line": 22, "column": 1 }, "end": { "line": 24, "column": 2 } } }, "loc": { "start": { "line": 21, "column": 13 }, "end": { "line": 24, "column": 2 } } }, "loc": { "start": { "line": 21, "column": 13 }, "end": { "line": 24, "column": 2 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 21, "column": 1 }, "end": { "line": 24, "column": 2 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "foo", "decorators": [], "loc": { "start": { "line": 21, "column": 10 }, "end": { "line": 21, "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": 21, "column": 10 }, "end": { "line": 21, "column": 13 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Int", "decorators": [], "loc": { "start": { "line": 21, "column": 18 }, "end": { "line": 21, "column": 21 } } }, "loc": { "start": { "line": 21, "column": 18 }, "end": { "line": 21, "column": 22 } } }, "loc": { "start": { "line": 21, "column": 18 }, "end": { "line": 21, "column": 22 } } }, "decorators": [], "loc": { "start": { "line": 21, "column": 14 }, "end": { "line": 21, "column": 22 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "b", "typeAnnotation": { "type": "ETSUnionType", "types": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "String", "decorators": [], "loc": { "start": { "line": 21, "column": 28 }, "end": { "line": 21, "column": 34 } } }, "loc": { "start": { "line": 21, "column": 28 }, "end": { "line": 21, "column": 35 } } }, "loc": { "start": { "line": 21, "column": 28 }, "end": { "line": 21, "column": 35 } } }, { "type": "ETSUndefinedType", "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "decorators": [], "loc": { "start": { "line": 21, "column": 23 }, "end": { "line": 21, "column": 35 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } } ], "returnType": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Int", "decorators": [], "loc": { "start": { "line": 21, "column": 52 }, "end": { "line": 21, "column": 55 } } }, "loc": { "start": { "line": 21, "column": 52 }, "end": { "line": 22, "column": 2 } } }, "loc": { "start": { "line": 21, "column": 52 }, "end": { "line": 22, "column": 2 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "foo", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "arguments": [ { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Int", "decorators": [], "loc": { "start": { "line": 21, "column": 18 }, "end": { "line": 21, "column": 21 } } }, "loc": { "start": { "line": 21, "column": 18 }, "end": { "line": 21, "column": 22 } } }, "loc": { "start": { "line": 21, "column": 18 }, "end": { "line": 21, "column": 22 } } }, "decorators": [], "loc": { "start": { "line": 21, "column": 14 }, "end": { "line": 21, "column": 22 } } }, { "type": "Identifier", "name": "b", "typeAnnotation": { "type": "ETSUnionType", "types": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "String", "decorators": [], "loc": { "start": { "line": 21, "column": 28 }, "end": { "line": 21, "column": 34 } } }, "loc": { "start": { "line": 21, "column": 28 }, "end": { "line": 21, "column": 35 } } }, "loc": { "start": { "line": 21, "column": 28 }, "end": { "line": 21, "column": 35 } } }, { "type": "ETSUndefinedType", "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "decorators": [], "loc": { "start": { "line": 21, "column": 23 }, "end": { "line": 21, "column": 35 } } }, { "type": "NumberLiteral", "value": 30, "loc": { "start": { "line": 21, "column": 46 }, "end": { "line": 21, "column": 48 } } } ], "optional": false, "loc": { "start": { "line": 21, "column": 1 }, "end": { "line": 24, "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": 658, "column": 1 }, "end": { "line": 658, "column": 1 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 21, "column": 1 }, "end": { "line": 1, "column": 1 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "foo", "decorators": [], "loc": { "start": { "line": 21, "column": 10 }, "end": { "line": 21, "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": 21, "column": 10 }, "end": { "line": 21, "column": 13 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Int", "decorators": [], "loc": { "start": { "line": 21, "column": 18 }, "end": { "line": 21, "column": 21 } } }, "loc": { "start": { "line": 21, "column": 18 }, "end": { "line": 21, "column": 22 } } }, "loc": { "start": { "line": 21, "column": 18 }, "end": { "line": 21, "column": 22 } } }, "decorators": [], "loc": { "start": { "line": 21, "column": 14 }, "end": { "line": 21, "column": 22 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } } ], "returnType": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Int", "decorators": [], "loc": { "start": { "line": 21, "column": 52 }, "end": { "line": 21, "column": 55 } } }, "loc": { "start": { "line": 21, "column": 52 }, "end": { "line": 22, "column": 2 } } }, "loc": { "start": { "line": 21, "column": 52 }, "end": { "line": 22, "column": 2 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "foo", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "arguments": [ { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Int", "decorators": [], "loc": { "start": { "line": 21, "column": 18 }, "end": { "line": 21, "column": 21 } } }, "loc": { "start": { "line": 21, "column": 18 }, "end": { "line": 21, "column": 22 } } }, "loc": { "start": { "line": 21, "column": 18 }, "end": { "line": 21, "column": 22 } } }, "decorators": [], "loc": { "start": { "line": 21, "column": 14 }, "end": { "line": 21, "column": 22 } } }, { "type": "UndefinedLiteral", "value": undefined, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, { "type": "NumberLiteral", "value": 30, "loc": { "start": { "line": 21, "column": 46 }, "end": { "line": 21, "column": 48 } } } ], "optional": false, "loc": { "start": { "line": 21, "column": 1 }, "end": { "line": 24, "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": 658, "column": 1 }, "end": { "line": 658, "column": 1 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 21, "column": 1 }, "end": { "line": 1, "column": 1 } } } ], "decorators": [], "loc": { "start": { "line": 16, "column": 1 }, "end": { "line": 19, "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": 25, "column": 1 } } }