{ "type": "Program", "statements": [ { "type": "ClassDeclaration", "definition": { "id": { "type": "Identifier", "name": "A", "decorators": [], "loc": { "start": { "line": 16, "column": 7 }, "end": { "line": 16, "column": 8 } } }, "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": 16, "column": 11 }, "end": { "line": 16, "column": 11 } } } ], "loc": { "start": { "line": 16, "column": 9 }, "end": { "line": 16, "column": 11 } } }, "loc": { "start": { "line": 16, "column": 1 }, "end": { "line": 16, "column": 11 } } }, { "type": "ClassDeclaration", "definition": { "id": { "type": "Identifier", "name": "B", "decorators": [], "loc": { "start": { "line": 17, "column": 7 }, "end": { "line": 17, "column": 8 } } }, "superClass": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "A", "decorators": [], "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 18 } } }, "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 20 } } }, "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 20 } } }, "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": 21 }, "end": { "line": 17, "column": 21 } } } ], "loc": { "start": { "line": 17, "column": 19 }, "end": { "line": 17, "column": 21 } } }, "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 17, "column": 21 } } }, { "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": "fn", "decorators": [], "loc": { "start": { "line": 19, "column": 10 }, "end": { "line": 19, "column": 12 } } }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "fn", "decorators": [], "loc": { "start": { "line": 19, "column": 10 }, "end": { "line": 19, "column": 12 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "x", "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "T", "decorators": [], "loc": { "start": { "line": 19, "column": 18 }, "end": { "line": 19, "column": 19 } } }, "loc": { "start": { "line": 19, "column": 18 }, "end": { "line": 19, "column": 20 } } }, "loc": { "start": { "line": 19, "column": 18 }, "end": { "line": 19, "column": 20 } } }, "decorators": [], "loc": { "start": { "line": 19, "column": 16 }, "end": { "line": 19, "column": 20 } } }, "loc": { "start": { "line": 19, "column": 16 }, "end": { "line": 19, "column": 20 } } } ], "typeParameters": { "type": "TSTypeParameterDeclaration", "params": [ { "type": "TSTypeParameter", "name": { "type": "Identifier", "name": "T", "decorators": [], "loc": { "start": { "line": 19, "column": 13 }, "end": { "line": 19, "column": 14 } } }, "loc": { "start": { "line": 19, "column": 13 }, "end": { "line": 19, "column": 15 } } } ], "loc": { "start": { "line": 19, "column": 12 }, "end": { "line": 19, "column": 15 } } }, "body": { "type": "BlockStatement", "statements": [], "loc": { "start": { "line": 19, "column": 21 }, "end": { "line": 19, "column": 23 } } }, "loc": { "start": { "line": 19, "column": 12 }, "end": { "line": 19, "column": 23 } } }, "loc": { "start": { "line": 19, "column": 12 }, "end": { "line": 19, "column": 23 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 19, "column": 1 }, "end": { "line": 19, "column": 23 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "main", "decorators": [], "loc": { "start": { "line": 21, "column": 10 }, "end": { "line": 21, "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": 21, "column": 10 }, "end": { "line": 21, "column": 14 } } }, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 21, "column": 19 }, "end": { "line": 21, "column": 23 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "b", "decorators": [], "loc": { "start": { "line": 22, "column": 7 }, "end": { "line": 22, "column": 8 } } }, "init": { "type": "ETSNewClassInstanceExpression", "typeReference": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "B", "decorators": [], "loc": { "start": { "line": 22, "column": 15 }, "end": { "line": 22, "column": 16 } } }, "loc": { "start": { "line": 22, "column": 15 }, "end": { "line": 22, "column": 17 } } }, "loc": { "start": { "line": 22, "column": 15 }, "end": { "line": 22, "column": 17 } } }, "arguments": [], "loc": { "start": { "line": 22, "column": 11 }, "end": { "line": 22, "column": 19 } } }, "loc": { "start": { "line": 22, "column": 7 }, "end": { "line": 22, "column": 19 } } } ], "kind": "let", "loc": { "start": { "line": 22, "column": 3 }, "end": { "line": 22, "column": 19 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "fn", "decorators": [], "loc": { "start": { "line": 24, "column": 3 }, "end": { "line": 24, "column": 5 } } }, "arguments": [ { "type": "Identifier", "name": "b", "decorators": [], "loc": { "start": { "line": 24, "column": 9 }, "end": { "line": 24, "column": 10 } } } ], "optional": false, "typeParameters": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "A", "decorators": [], "loc": { "start": { "line": 24, "column": 6 }, "end": { "line": 24, "column": 7 } } }, "loc": { "start": { "line": 24, "column": 6 }, "end": { "line": 24, "column": 8 } } }, "loc": { "start": { "line": 24, "column": 6 }, "end": { "line": 24, "column": 8 } } } ], "loc": { "start": { "line": 24, "column": 5 }, "end": { "line": 24, "column": 8 } } }, "loc": { "start": { "line": 24, "column": 3 }, "end": { "line": 24, "column": 11 } } }, "loc": { "start": { "line": 24, "column": 3 }, "end": { "line": 24, "column": 12 } } } ], "loc": { "start": { "line": 21, "column": 24 }, "end": { "line": 25, "column": 2 } } }, "loc": { "start": { "line": 21, "column": 14 }, "end": { "line": 25, "column": 2 } } }, "loc": { "start": { "line": 21, "column": 14 }, "end": { "line": 25, "column": 2 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 21, "column": 1 }, "end": { "line": 25, "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": 26, "column": 1 } } }