{ "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": "ClassProperty", "key": { "type": "Identifier", "name": "global", "decorators": [], "loc": { "start": { "line": 16, "column": 5 }, "end": { "line": 16, "column": 11 } } }, "accessibility": "public", "static": true, "readonly": false, "declare": false, "optional": false, "computed": false, "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 16 } } }, "definite": false, "decorators": [], "loc": { "start": { "line": 16, "column": 5 }, "end": { "line": 16, "column": 11 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "func", "decorators": [], "loc": { "start": { "line": 18, "column": 16 }, "end": { "line": 18, "column": 20 } } }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "func", "decorators": [], "loc": { "start": { "line": 18, "column": 16 }, "end": { "line": 18, "column": 20 } } }, "generator": false, "async": true, "expression": false, "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "param", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 18, "column": 28 }, "end": { "line": 18, "column": 31 } } }, "decorators": [], "loc": { "start": { "line": 18, "column": 21 }, "end": { "line": 18, "column": 31 } } }, "loc": { "start": { "line": 18, "column": 21 }, "end": { "line": 18, "column": 31 } } } ], "returnType": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Promise", "decorators": [], "loc": { "start": { "line": 18, "column": 34 }, "end": { "line": 18, "column": 41 } } }, "typeParams": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "ETSUnionType", "types": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "String", "decorators": [], "loc": { "start": { "line": 18, "column": 42 }, "end": { "line": 18, "column": 48 } } }, "loc": { "start": { "line": 18, "column": 42 }, "end": { "line": 18, "column": 50 } } }, "loc": { "start": { "line": 18, "column": 42 }, "end": { "line": 18, "column": 50 } } }, { "type": "ETSNullType", "loc": { "start": { "line": 18, "column": 51 }, "end": { "line": 18, "column": 55 } } } ], "loc": { "start": { "line": 18, "column": 42 }, "end": { "line": 18, "column": 55 } } } ], "loc": { "start": { "line": 18, "column": 41 }, "end": { "line": 18, "column": 56 } } }, "loc": { "start": { "line": 18, "column": 34 }, "end": { "line": 18, "column": 58 } } }, "loc": { "start": { "line": 18, "column": 34 }, "end": { "line": 18, "column": 58 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "local", "typeAnnotation": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 19, "column": 16 }, "end": { "line": 19, "column": 19 } } }, "decorators": [], "loc": { "start": { "line": 19, "column": 9 }, "end": { "line": 19, "column": 14 } } }, "init": null, "loc": { "start": { "line": 19, "column": 9 }, "end": { "line": 19, "column": 14 } } } ], "kind": "let", "loc": { "start": { "line": 19, "column": 5 }, "end": { "line": 19, "column": 20 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "lambda", "typeAnnotation": { "type": "ETSFunctionType", "params": [], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 20, "column": 23 }, "end": { "line": 20, "column": 27 } } }, "loc": { "start": { "line": 20, "column": 17 }, "end": { "line": 20, "column": 27 } } }, "decorators": [], "loc": { "start": { "line": 20, "column": 9 }, "end": { "line": 20, "column": 15 } } }, "init": { "type": "ArrowFunctionExpression", "function": { "type": "ScriptFunction", "id": null, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 20, "column": 34 }, "end": { "line": 20, "column": 38 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "ExpressionStatement", "expression": { "type": "Identifier", "name": "param", "decorators": [], "loc": { "start": { "line": 21, "column": 9 }, "end": { "line": 21, "column": 14 } } }, "loc": { "start": { "line": 21, "column": 9 }, "end": { "line": 21, "column": 15 } } }, { "type": "ExpressionStatement", "expression": { "type": "Identifier", "name": "local", "decorators": [], "loc": { "start": { "line": 22, "column": 9 }, "end": { "line": 22, "column": 14 } } }, "loc": { "start": { "line": 22, "column": 9 }, "end": { "line": 22, "column": 15 } } }, { "type": "ExpressionStatement", "expression": { "type": "Identifier", "name": "global", "decorators": [], "loc": { "start": { "line": 23, "column": 9 }, "end": { "line": 23, "column": 15 } } }, "loc": { "start": { "line": 23, "column": 9 }, "end": { "line": 23, "column": 16 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "decorators": [], "loc": { "start": { "line": 24, "column": 13 }, "end": { "line": 24, "column": 14 } } }, "init": { "type": "NumberLiteral", "value": 0, "loc": { "start": { "line": 24, "column": 17 }, "end": { "line": 24, "column": 18 } } }, "loc": { "start": { "line": 24, "column": 13 }, "end": { "line": 24, "column": 18 } } } ], "kind": "let", "loc": { "start": { "line": 24, "column": 9 }, "end": { "line": 24, "column": 19 } } } ], "loc": { "start": { "line": 20, "column": 42 }, "end": { "line": 25, "column": 6 } } }, "loc": { "start": { "line": 20, "column": 30 }, "end": { "line": 25, "column": 6 } } }, "loc": { "start": { "line": 20, "column": 30 }, "end": { "line": 25, "column": 6 } } }, "loc": { "start": { "line": 20, "column": 9 }, "end": { "line": 25, "column": 6 } } } ], "kind": "let", "loc": { "start": { "line": 20, "column": 5 }, "end": { "line": 25, "column": 6 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "async_lambda", "typeAnnotation": { "type": "ETSFunctionType", "params": [], "returnType": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Promise", "decorators": [], "loc": { "start": { "line": 26, "column": 29 }, "end": { "line": 26, "column": 36 } } }, "typeParams": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "ETSUnionType", "types": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Object", "decorators": [], "loc": { "start": { "line": 26, "column": 37 }, "end": { "line": 26, "column": 43 } } }, "loc": { "start": { "line": 26, "column": 37 }, "end": { "line": 26, "column": 45 } } }, "loc": { "start": { "line": 26, "column": 37 }, "end": { "line": 26, "column": 45 } } }, { "type": "ETSNullType", "loc": { "start": { "line": 26, "column": 46 }, "end": { "line": 26, "column": 50 } } } ], "loc": { "start": { "line": 26, "column": 37 }, "end": { "line": 26, "column": 50 } } } ], "loc": { "start": { "line": 26, "column": 36 }, "end": { "line": 26, "column": 51 } } }, "loc": { "start": { "line": 26, "column": 29 }, "end": { "line": 26, "column": 53 } } }, "loc": { "start": { "line": 26, "column": 29 }, "end": { "line": 26, "column": 53 } } }, "loc": { "start": { "line": 26, "column": 23 }, "end": { "line": 26, "column": 53 } } }, "decorators": [], "loc": { "start": { "line": 26, "column": 9 }, "end": { "line": 26, "column": 21 } } }, "init": { "type": "ArrowFunctionExpression", "function": { "type": "ScriptFunction", "id": null, "generator": false, "async": true, "expression": false, "params": [], "returnType": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Promise", "decorators": [], "loc": { "start": { "line": 26, "column": 64 }, "end": { "line": 26, "column": 71 } } }, "typeParams": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "ETSUnionType", "types": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Object", "decorators": [], "loc": { "start": { "line": 26, "column": 72 }, "end": { "line": 26, "column": 78 } } }, "loc": { "start": { "line": 26, "column": 72 }, "end": { "line": 26, "column": 80 } } }, "loc": { "start": { "line": 26, "column": 72 }, "end": { "line": 26, "column": 80 } } }, { "type": "ETSNullType", "loc": { "start": { "line": 26, "column": 81 }, "end": { "line": 26, "column": 85 } } } ], "loc": { "start": { "line": 26, "column": 72 }, "end": { "line": 26, "column": 85 } } } ], "loc": { "start": { "line": 26, "column": 71 }, "end": { "line": 26, "column": 86 } } }, "loc": { "start": { "line": 26, "column": 64 }, "end": { "line": 26, "column": 89 } } }, "loc": { "start": { "line": 26, "column": 64 }, "end": { "line": 26, "column": 89 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "ExpressionStatement", "expression": { "type": "Identifier", "name": "param", "decorators": [], "loc": { "start": { "line": 27, "column": 9 }, "end": { "line": 27, "column": 14 } } }, "loc": { "start": { "line": 27, "column": 9 }, "end": { "line": 27, "column": 15 } } }, { "type": "ExpressionStatement", "expression": { "type": "Identifier", "name": "local", "decorators": [], "loc": { "start": { "line": 28, "column": 9 }, "end": { "line": 28, "column": 14 } } }, "loc": { "start": { "line": 28, "column": 9 }, "end": { "line": 28, "column": 15 } } }, { "type": "ExpressionStatement", "expression": { "type": "Identifier", "name": "global", "decorators": [], "loc": { "start": { "line": 29, "column": 9 }, "end": { "line": 29, "column": 15 } } }, "loc": { "start": { "line": 29, "column": 9 }, "end": { "line": 29, "column": 16 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "decorators": [], "loc": { "start": { "line": 30, "column": 13 }, "end": { "line": 30, "column": 14 } } }, "init": { "type": "NumberLiteral", "value": 0, "loc": { "start": { "line": 30, "column": 17 }, "end": { "line": 30, "column": 18 } } }, "loc": { "start": { "line": 30, "column": 13 }, "end": { "line": 30, "column": 18 } } } ], "kind": "let", "loc": { "start": { "line": 30, "column": 9 }, "end": { "line": 30, "column": 19 } } }, { "type": "ReturnStatement", "argument": { "type": "NullLiteral", "value": null, "loc": { "start": { "line": 31, "column": 16 }, "end": { "line": 31, "column": 20 } } }, "loc": { "start": { "line": 31, "column": 9 }, "end": { "line": 31, "column": 21 } } } ], "loc": { "start": { "line": 26, "column": 90 }, "end": { "line": 32, "column": 6 } } }, "loc": { "start": { "line": 26, "column": 60 }, "end": { "line": 32, "column": 6 } } }, "loc": { "start": { "line": 26, "column": 60 }, "end": { "line": 32, "column": 6 } } }, "loc": { "start": { "line": 26, "column": 9 }, "end": { "line": 32, "column": 6 } } } ], "kind": "let", "loc": { "start": { "line": 26, "column": 5 }, "end": { "line": 32, "column": 6 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "asyncLambda", "typeAnnotation": { "type": "ETSFunctionType", "params": [], "returnType": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Promise", "decorators": [], "loc": { "start": { "line": 33, "column": 28 }, "end": { "line": 33, "column": 35 } } }, "typeParams": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Object", "decorators": [], "loc": { "start": { "line": 33, "column": 36 }, "end": { "line": 33, "column": 42 } } }, "loc": { "start": { "line": 33, "column": 36 }, "end": { "line": 33, "column": 43 } } }, "loc": { "start": { "line": 33, "column": 36 }, "end": { "line": 33, "column": 43 } } } ], "loc": { "start": { "line": 33, "column": 35 }, "end": { "line": 33, "column": 43 } } }, "loc": { "start": { "line": 33, "column": 28 }, "end": { "line": 33, "column": 45 } } }, "loc": { "start": { "line": 33, "column": 28 }, "end": { "line": 33, "column": 45 } } }, "loc": { "start": { "line": 33, "column": 22 }, "end": { "line": 33, "column": 45 } } }, "decorators": [], "loc": { "start": { "line": 33, "column": 9 }, "end": { "line": 33, "column": 20 } } }, "init": { "type": "ArrowFunctionExpression", "function": { "type": "ScriptFunction", "id": null, "generator": false, "async": true, "expression": false, "params": [], "returnType": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Promise", "decorators": [], "loc": { "start": { "line": 33, "column": 56 }, "end": { "line": 33, "column": 63 } } }, "typeParams": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Object", "decorators": [], "loc": { "start": { "line": 33, "column": 64 }, "end": { "line": 33, "column": 70 } } }, "loc": { "start": { "line": 33, "column": 64 }, "end": { "line": 33, "column": 71 } } }, "loc": { "start": { "line": 33, "column": 64 }, "end": { "line": 33, "column": 71 } } } ], "loc": { "start": { "line": 33, "column": 63 }, "end": { "line": 33, "column": 71 } } }, "loc": { "start": { "line": 33, "column": 56 }, "end": { "line": 33, "column": 74 } } }, "loc": { "start": { "line": 33, "column": 56 }, "end": { "line": 33, "column": 74 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "ETSNewClassInstanceExpression", "typeReference": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Promise", "decorators": [], "loc": { "start": { "line": 34, "column": 20 }, "end": { "line": 34, "column": 27 } } }, "typeParams": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Object", "decorators": [], "loc": { "start": { "line": 34, "column": 28 }, "end": { "line": 34, "column": 34 } } }, "loc": { "start": { "line": 34, "column": 28 }, "end": { "line": 34, "column": 35 } } }, "loc": { "start": { "line": 34, "column": 28 }, "end": { "line": 34, "column": 35 } } } ], "loc": { "start": { "line": 34, "column": 27 }, "end": { "line": 34, "column": 35 } } }, "loc": { "start": { "line": 34, "column": 20 }, "end": { "line": 34, "column": 36 } } }, "loc": { "start": { "line": 34, "column": 20 }, "end": { "line": 34, "column": 36 } } }, "arguments": [ { "type": "ArrowFunctionExpression", "function": { "type": "ScriptFunction", "id": null, "generator": false, "async": false, "expression": false, "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "resolve", "typeAnnotation": { "type": "ETSFunctionType", "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "value", "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Object", "decorators": [], "loc": { "start": { "line": 34, "column": 54 }, "end": { "line": 34, "column": 60 } } }, "loc": { "start": { "line": 34, "column": 54 }, "end": { "line": 34, "column": 61 } } }, "loc": { "start": { "line": 34, "column": 54 }, "end": { "line": 34, "column": 61 } } }, "decorators": [], "loc": { "start": { "line": 34, "column": 47 }, "end": { "line": 34, "column": 61 } } }, "loc": { "start": { "line": 34, "column": 47 }, "end": { "line": 34, "column": 61 } } } ], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 34, "column": 65 }, "end": { "line": 34, "column": 69 } } }, "loc": { "start": { "line": 34, "column": 46 }, "end": { "line": 34, "column": 69 } } }, "decorators": [], "loc": { "start": { "line": 34, "column": 37 }, "end": { "line": 34, "column": 69 } } }, "loc": { "start": { "line": 34, "column": 37 }, "end": { "line": 34, "column": 69 } } } ], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 34, "column": 72 }, "end": { "line": 34, "column": 76 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "resolve", "decorators": [], "loc": { "start": { "line": 35, "column": 13 }, "end": { "line": 35, "column": 20 } } }, "arguments": [ { "type": "ETSNewClassInstanceExpression", "typeReference": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Object", "decorators": [], "loc": { "start": { "line": 35, "column": 25 }, "end": { "line": 35, "column": 31 } } }, "loc": { "start": { "line": 35, "column": 25 }, "end": { "line": 35, "column": 32 } } }, "loc": { "start": { "line": 35, "column": 25 }, "end": { "line": 35, "column": 32 } } }, "arguments": [], "loc": { "start": { "line": 35, "column": 21 }, "end": { "line": 35, "column": 34 } } } ], "optional": false, "loc": { "start": { "line": 35, "column": 13 }, "end": { "line": 35, "column": 34 } } }, "loc": { "start": { "line": 35, "column": 13 }, "end": { "line": 35, "column": 35 } } } ], "loc": { "start": { "line": 34, "column": 80 }, "end": { "line": 36, "column": 10 } } }, "loc": { "start": { "line": 34, "column": 36 }, "end": { "line": 36, "column": 10 } } }, "loc": { "start": { "line": 34, "column": 36 }, "end": { "line": 36, "column": 10 } } } ], "loc": { "start": { "line": 34, "column": 16 }, "end": { "line": 36, "column": 12 } } }, "loc": { "start": { "line": 34, "column": 9 }, "end": { "line": 36, "column": 12 } } } ], "loc": { "start": { "line": 33, "column": 75 }, "end": { "line": 37, "column": 6 } } }, "loc": { "start": { "line": 33, "column": 52 }, "end": { "line": 37, "column": 6 } } }, "loc": { "start": { "line": 33, "column": 52 }, "end": { "line": 37, "column": 6 } } }, "loc": { "start": { "line": 33, "column": 9 }, "end": { "line": 37, "column": 6 } } } ], "kind": "let", "loc": { "start": { "line": 33, "column": 5 }, "end": { "line": 37, "column": 6 } } }, { "type": "ReturnStatement", "argument": { "type": "NullLiteral", "value": null, "loc": { "start": { "line": 38, "column": 12 }, "end": { "line": 38, "column": 16 } } }, "loc": { "start": { "line": 38, "column": 5 }, "end": { "line": 38, "column": 17 } } } ], "loc": { "start": { "line": 18, "column": 57 }, "end": { "line": 39, "column": 2 } } }, "loc": { "start": { "line": 18, "column": 20 }, "end": { "line": 39, "column": 2 } } }, "loc": { "start": { "line": 18, "column": 20 }, "end": { "line": 39, "column": 2 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 39, "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": 40, "column": 1 } } }