{ "type": "Program", "statements": [ { "type": "ClassDeclaration", "definition": { "id": { "type": "Identifier", "name": "B", "decorators": [], "loc": { "start": { "line": 16, "column": 7 }, "end": { "line": 16, "column": 8 } } }, "typeParameters": { "type": "TSTypeParameterDeclaration", "params": [ { "type": "TSTypeParameter", "name": { "type": "Identifier", "name": "T", "decorators": [], "loc": { "start": { "line": 16, "column": 9 }, "end": { "line": 16, "column": 10 } } }, "constraint": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Object", "decorators": [], "loc": { "start": { "line": 16, "column": 19 }, "end": { "line": 16, "column": 25 } } }, "loc": { "start": { "line": 16, "column": 19 }, "end": { "line": 16, "column": 26 } } }, "loc": { "start": { "line": 16, "column": 19 }, "end": { "line": 16, "column": 26 } } }, "loc": { "start": { "line": 16, "column": 9 }, "end": { "line": 16, "column": 26 } } } ], "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 26 } } }, "superClass": null, "implements": [], "body": [ { "type": "ClassProperty", "key": { "type": "Identifier", "name": "a0", "decorators": [], "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 15 } } }, "accessibility": "private", "static": false, "readonly": false, "declare": false, "optional": false, "computed": false, "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "T", "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": 17 }, "end": { "line": 17, "column": 19 } } }, "definite": false, "decorators": [], "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 19 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "constructor", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "kind": "constructor", "accessibility": "public", "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": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "a0", "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "T", "decorators": [], "loc": { "start": { "line": 18, "column": 21 }, "end": { "line": 18, "column": 22 } } }, "loc": { "start": { "line": 18, "column": 21 }, "end": { "line": 18, "column": 23 } } }, "loc": { "start": { "line": 18, "column": 21 }, "end": { "line": 18, "column": 23 } } }, "decorators": [], "loc": { "start": { "line": 18, "column": 17 }, "end": { "line": 18, "column": 23 } } }, "loc": { "start": { "line": 18, "column": 17 }, "end": { "line": 18, "column": 23 } } } ], "body": { "type": "BlockStatement", "statements": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "object": { "type": "ThisExpression", "loc": { "start": { "line": 19, "column": 9 }, "end": { "line": 19, "column": 13 } } }, "property": { "type": "Identifier", "name": "a0", "decorators": [], "loc": { "start": { "line": 19, "column": 14 }, "end": { "line": 19, "column": 16 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 19, "column": 9 }, "end": { "line": 19, "column": 16 } } }, "right": { "type": "Identifier", "name": "a0", "decorators": [], "loc": { "start": { "line": 19, "column": 19 }, "end": { "line": 19, "column": 21 } } }, "loc": { "start": { "line": 19, "column": 9 }, "end": { "line": 19, "column": 21 } } }, "loc": { "start": { "line": 19, "column": 9 }, "end": { "line": 19, "column": 22 } } } ], "loc": { "start": { "line": 18, "column": 24 }, "end": { "line": 20, "column": 6 } } }, "loc": { "start": { "line": 18, "column": 16 }, "end": { "line": 20, "column": 6 } } }, "loc": { "start": { "line": 18, "column": 16 }, "end": { "line": 20, "column": 6 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 20, "column": 6 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "f1", "decorators": [], "loc": { "start": { "line": 21, "column": 12 }, "end": { "line": 21, "column": 14 } } }, "kind": "method", "accessibility": "public", "static": false, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "f1", "decorators": [], "loc": { "start": { "line": 21, "column": 12 }, "end": { "line": 21, "column": 14 } } }, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "T", "decorators": [], "loc": { "start": { "line": 21, "column": 18 }, "end": { "line": 21, "column": 19 } } }, "loc": { "start": { "line": 21, "column": 18 }, "end": { "line": 21, "column": 21 } } }, "loc": { "start": { "line": 21, "column": 18 }, "end": { "line": 21, "column": 21 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "MemberExpression", "object": { "type": "ThisExpression", "loc": { "start": { "line": 22, "column": 16 }, "end": { "line": 22, "column": 20 } } }, "property": { "type": "Identifier", "name": "a0", "decorators": [], "loc": { "start": { "line": 22, "column": 21 }, "end": { "line": 22, "column": 23 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 22, "column": 16 }, "end": { "line": 22, "column": 23 } } }, "loc": { "start": { "line": 22, "column": 9 }, "end": { "line": 22, "column": 24 } } } ], "loc": { "start": { "line": 21, "column": 20 }, "end": { "line": 23, "column": 6 } } }, "loc": { "start": { "line": 21, "column": 14 }, "end": { "line": 23, "column": 6 } } }, "loc": { "start": { "line": 21, "column": 14 }, "end": { "line": 23, "column": 6 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 21, "column": 5 }, "end": { "line": 23, "column": 6 } } } ], "loc": { "start": { "line": 16, "column": 27 }, "end": { "line": 24, "column": 2 } } }, "loc": { "start": { "line": 16, "column": 1 }, "end": { "line": 24, "column": 2 } } }, { "type": "ClassDeclaration", "definition": { "id": { "type": "Identifier", "name": "A", "decorators": [], "loc": { "start": { "line": 26, "column": 7 }, "end": { "line": 26, "column": 8 } } }, "superClass": null, "implements": [], "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "foo", "decorators": [], "loc": { "start": { "line": 27, "column": 12 }, "end": { "line": 27, "column": 15 } } }, "kind": "method", "accessibility": "public", "static": false, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "foo", "decorators": [], "loc": { "start": { "line": 27, "column": 12 }, "end": { "line": 27, "column": 15 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "token", "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Object", "decorators": [], "loc": { "start": { "line": 27, "column": 23 }, "end": { "line": 27, "column": 29 } } }, "loc": { "start": { "line": 27, "column": 23 }, "end": { "line": 27, "column": 30 } } }, "loc": { "start": { "line": 27, "column": 23 }, "end": { "line": 27, "column": 30 } } }, "decorators": [], "loc": { "start": { "line": 27, "column": 16 }, "end": { "line": 27, "column": 30 } } }, "loc": { "start": { "line": 27, "column": 16 }, "end": { "line": 27, "column": 30 } } } ], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 27, "column": 33 }, "end": { "line": 27, "column": 37 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "refToken", "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "B", "decorators": [], "loc": { "start": { "line": 28, "column": 23 }, "end": { "line": 28, "column": 24 } } }, "typeParams": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Object", "decorators": [], "loc": { "start": { "line": 28, "column": 25 }, "end": { "line": 28, "column": 31 } } }, "loc": { "start": { "line": 28, "column": 25 }, "end": { "line": 28, "column": 32 } } }, "loc": { "start": { "line": 28, "column": 25 }, "end": { "line": 28, "column": 32 } } } ], "loc": { "start": { "line": 28, "column": 24 }, "end": { "line": 28, "column": 32 } } }, "loc": { "start": { "line": 28, "column": 23 }, "end": { "line": 28, "column": 34 } } }, "loc": { "start": { "line": 28, "column": 23 }, "end": { "line": 28, "column": 34 } } }, "decorators": [], "loc": { "start": { "line": 28, "column": 13 }, "end": { "line": 28, "column": 21 } } }, "init": { "type": "TSAsExpression", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "ThisExpression", "loc": { "start": { "line": 28, "column": 35 }, "end": { "line": 28, "column": 39 } } }, "property": { "type": "Identifier", "name": "f2", "decorators": [], "loc": { "start": { "line": 28, "column": 40 }, "end": { "line": 28, "column": 42 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 28, "column": 35 }, "end": { "line": 28, "column": 42 } } }, "arguments": [], "optional": false, "loc": { "start": { "line": 28, "column": 35 }, "end": { "line": 28, "column": 44 } } }, "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "B", "decorators": [], "loc": { "start": { "line": 28, "column": 48 }, "end": { "line": 28, "column": 49 } } }, "typeParams": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Object", "decorators": [], "loc": { "start": { "line": 28, "column": 50 }, "end": { "line": 28, "column": 56 } } }, "loc": { "start": { "line": 28, "column": 50 }, "end": { "line": 28, "column": 57 } } }, "loc": { "start": { "line": 28, "column": 50 }, "end": { "line": 28, "column": 57 } } } ], "loc": { "start": { "line": 28, "column": 49 }, "end": { "line": 28, "column": 57 } } }, "loc": { "start": { "line": 28, "column": 48 }, "end": { "line": 28, "column": 58 } } }, "loc": { "start": { "line": 28, "column": 48 }, "end": { "line": 28, "column": 58 } } }, "loc": { "start": { "line": 28, "column": 35 }, "end": { "line": 28, "column": 44 } } }, "loc": { "start": { "line": 28, "column": 13 }, "end": { "line": 28, "column": 44 } } } ], "kind": "let", "loc": { "start": { "line": 28, "column": 9 }, "end": { "line": 28, "column": 58 } } } ], "loc": { "start": { "line": 27, "column": 38 }, "end": { "line": 29, "column": 6 } } }, "loc": { "start": { "line": 27, "column": 15 }, "end": { "line": 29, "column": 6 } } }, "loc": { "start": { "line": 27, "column": 15 }, "end": { "line": 29, "column": 6 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 27, "column": 5 }, "end": { "line": 29, "column": 6 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "bar", "decorators": [], "loc": { "start": { "line": 30, "column": 13 }, "end": { "line": 30, "column": 16 } } }, "kind": "method", "accessibility": "private", "static": false, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "bar", "decorators": [], "loc": { "start": { "line": 30, "column": 13 }, "end": { "line": 30, "column": 16 } } }, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 30, "column": 21 }, "end": { "line": 30, "column": 25 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "ref", "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "B", "decorators": [], "loc": { "start": { "line": 31, "column": 18 }, "end": { "line": 31, "column": 19 } } }, "typeParams": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Object", "decorators": [], "loc": { "start": { "line": 31, "column": 20 }, "end": { "line": 31, "column": 26 } } }, "loc": { "start": { "line": 31, "column": 20 }, "end": { "line": 31, "column": 27 } } }, "loc": { "start": { "line": 31, "column": 20 }, "end": { "line": 31, "column": 27 } } } ], "loc": { "start": { "line": 31, "column": 19 }, "end": { "line": 31, "column": 27 } } }, "loc": { "start": { "line": 31, "column": 18 }, "end": { "line": 31, "column": 29 } } }, "loc": { "start": { "line": 31, "column": 18 }, "end": { "line": 31, "column": 29 } } }, "decorators": [], "loc": { "start": { "line": 31, "column": 13 }, "end": { "line": 31, "column": 16 } } }, "init": { "type": "TSAsExpression", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "ThisExpression", "loc": { "start": { "line": 31, "column": 30 }, "end": { "line": 31, "column": 34 } } }, "property": { "type": "Identifier", "name": "f2", "decorators": [], "loc": { "start": { "line": 31, "column": 35 }, "end": { "line": 31, "column": 37 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 31, "column": 30 }, "end": { "line": 31, "column": 37 } } }, "arguments": [], "optional": false, "loc": { "start": { "line": 31, "column": 30 }, "end": { "line": 31, "column": 39 } } }, "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "B", "decorators": [], "loc": { "start": { "line": 31, "column": 43 }, "end": { "line": 31, "column": 44 } } }, "typeParams": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Object", "decorators": [], "loc": { "start": { "line": 31, "column": 45 }, "end": { "line": 31, "column": 51 } } }, "loc": { "start": { "line": 31, "column": 45 }, "end": { "line": 31, "column": 52 } } }, "loc": { "start": { "line": 31, "column": 45 }, "end": { "line": 31, "column": 52 } } } ], "loc": { "start": { "line": 31, "column": 44 }, "end": { "line": 31, "column": 52 } } }, "loc": { "start": { "line": 31, "column": 43 }, "end": { "line": 31, "column": 53 } } }, "loc": { "start": { "line": 31, "column": 43 }, "end": { "line": 31, "column": 53 } } }, "loc": { "start": { "line": 31, "column": 30 }, "end": { "line": 31, "column": 39 } } }, "loc": { "start": { "line": 31, "column": 13 }, "end": { "line": 31, "column": 39 } } } ], "kind": "let", "loc": { "start": { "line": 31, "column": 9 }, "end": { "line": 31, "column": 53 } } }, { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "==", "left": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "ref", "decorators": [], "loc": { "start": { "line": 32, "column": 13 }, "end": { "line": 32, "column": 16 } } }, "property": { "type": "Identifier", "name": "f1", "decorators": [], "loc": { "start": { "line": 32, "column": 17 }, "end": { "line": 32, "column": 19 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 32, "column": 13 }, "end": { "line": 32, "column": 19 } } }, "arguments": [], "optional": false, "loc": { "start": { "line": 32, "column": 13 }, "end": { "line": 32, "column": 21 } } }, "right": { "type": "NullLiteral", "value": null, "loc": { "start": { "line": 32, "column": 25 }, "end": { "line": 32, "column": 29 } } }, "loc": { "start": { "line": 32, "column": 13 }, "end": { "line": 32, "column": 29 } } }, "consequent": { "type": "BlockStatement", "statements": [], "loc": { "start": { "line": 32, "column": 31 }, "end": { "line": 32, "column": 33 } } }, "alternate": null, "loc": { "start": { "line": 32, "column": 9 }, "end": { "line": 32, "column": 33 } } } ], "loc": { "start": { "line": 30, "column": 26 }, "end": { "line": 33, "column": 6 } } }, "loc": { "start": { "line": 30, "column": 16 }, "end": { "line": 33, "column": 6 } } }, "loc": { "start": { "line": 30, "column": 16 }, "end": { "line": 33, "column": 6 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 30, "column": 5 }, "end": { "line": 33, "column": 6 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "f2", "decorators": [], "loc": { "start": { "line": 35, "column": 13 }, "end": { "line": 35, "column": 15 } } }, "kind": "method", "accessibility": "private", "static": false, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "f2", "decorators": [], "loc": { "start": { "line": 35, "column": 13 }, "end": { "line": 35, "column": 15 } } }, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Object", "decorators": [], "loc": { "start": { "line": 35, "column": 20 }, "end": { "line": 35, "column": 26 } } }, "loc": { "start": { "line": 35, "column": 20 }, "end": { "line": 35, "column": 28 } } }, "loc": { "start": { "line": 35, "column": 20 }, "end": { "line": 35, "column": 28 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "ETSNewClassInstanceExpression", "typeReference": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Object", "decorators": [], "loc": { "start": { "line": 35, "column": 40 }, "end": { "line": 35, "column": 46 } } }, "loc": { "start": { "line": 35, "column": 40 }, "end": { "line": 35, "column": 47 } } }, "loc": { "start": { "line": 35, "column": 40 }, "end": { "line": 35, "column": 47 } } }, "arguments": [], "loc": { "start": { "line": 35, "column": 36 }, "end": { "line": 35, "column": 49 } } }, "loc": { "start": { "line": 35, "column": 29 }, "end": { "line": 35, "column": 49 } } } ], "loc": { "start": { "line": 35, "column": 27 }, "end": { "line": 35, "column": 51 } } }, "loc": { "start": { "line": 35, "column": 15 }, "end": { "line": 35, "column": 51 } } }, "loc": { "start": { "line": 35, "column": 15 }, "end": { "line": 35, "column": 51 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 35, "column": 5 }, "end": { "line": 35, "column": 51 } } }, { "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": 36, "column": 2 }, "end": { "line": 36, "column": 2 } } } ], "loc": { "start": { "line": 26, "column": 9 }, "end": { "line": 36, "column": 2 } } }, "loc": { "start": { "line": 26, "column": 1 }, "end": { "line": 36, "column": 2 } } }, { "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 } } } ], "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": 37, "column": 1 } } }