{ "type": "Program", "statements": [ { "type": "TSInterfaceDeclaration", "body": { "type": "TSInterfaceBody", "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "localeCompare", "decorators": [], "loc": { "start": { "line": 17, "column": 3 }, "end": { "line": 17, "column": 16 } } }, "kind": "method", "accessibility": "public", "static": false, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "localeCompare", "decorators": [], "loc": { "start": { "line": 17, "column": 3 }, "end": { "line": 17, "column": 16 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "other", "typeAnnotation": { "type": "ETSUnionType", "types": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Object", "decorators": [], "loc": { "start": { "line": 17, "column": 24 }, "end": { "line": 17, "column": 30 } } }, "loc": { "start": { "line": 17, "column": 24 }, "end": { "line": 17, "column": 31 } } }, "loc": { "start": { "line": 17, "column": 24 }, "end": { "line": 17, "column": 31 } } }, { "type": "ETSNullType", "loc": { "start": { "line": 17, "column": 31 }, "end": { "line": 17, "column": 35 } } } ], "loc": { "start": { "line": 17, "column": 24 }, "end": { "line": 17, "column": 35 } } }, "decorators": [], "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 35 } } }, "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 35 } } } ], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 17, "column": 38 }, "end": { "line": 17, "column": 41 } } }, "declare": true, "loc": { "start": { "line": 17, "column": 16 }, "end": { "line": 17, "column": 41 } } }, "loc": { "start": { "line": 17, "column": 16 }, "end": { "line": 17, "column": 41 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 17, "column": 3 }, "end": { "line": 17, "column": 42 } } } ], "loc": { "start": { "line": 16, "column": 23 }, "end": { "line": 18, "column": 2 } } }, "id": { "type": "Identifier", "name": "Comparable2", "decorators": [], "loc": { "start": { "line": 16, "column": 11 }, "end": { "line": 16, "column": 22 } } }, "extends": [], "loc": { "start": { "line": 16, "column": 1 }, "end": { "line": 20, "column": 9 } } }, { "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": "compare", "decorators": [], "loc": { "start": { "line": 20, "column": 10 }, "end": { "line": 20, "column": 17 } } }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "compare", "decorators": [], "loc": { "start": { "line": 20, "column": 10 }, "end": { "line": 20, "column": 17 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "x", "typeAnnotation": { "type": "ETSUnionType", "types": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "T", "decorators": [], "loc": { "start": { "line": 20, "column": 44 }, "end": { "line": 20, "column": 45 } } }, "loc": { "start": { "line": 20, "column": 44 }, "end": { "line": 20, "column": 46 } } }, "loc": { "start": { "line": 20, "column": 44 }, "end": { "line": 20, "column": 46 } } }, { "type": "ETSNullType", "loc": { "start": { "line": 20, "column": 46 }, "end": { "line": 20, "column": 50 } } } ], "loc": { "start": { "line": 20, "column": 44 }, "end": { "line": 20, "column": 50 } } }, "decorators": [], "loc": { "start": { "line": 20, "column": 41 }, "end": { "line": 20, "column": 50 } } }, "loc": { "start": { "line": 20, "column": 41 }, "end": { "line": 20, "column": 50 } } }, { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "y", "typeAnnotation": { "type": "ETSUnionType", "types": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "T", "decorators": [], "loc": { "start": { "line": 20, "column": 55 }, "end": { "line": 20, "column": 56 } } }, "loc": { "start": { "line": 20, "column": 55 }, "end": { "line": 20, "column": 57 } } }, "loc": { "start": { "line": 20, "column": 55 }, "end": { "line": 20, "column": 57 } } }, { "type": "ETSNullType", "loc": { "start": { "line": 20, "column": 57 }, "end": { "line": 20, "column": 61 } } } ], "loc": { "start": { "line": 20, "column": 55 }, "end": { "line": 20, "column": 61 } } }, "decorators": [], "loc": { "start": { "line": 20, "column": 52 }, "end": { "line": 20, "column": 61 } } }, "loc": { "start": { "line": 20, "column": 52 }, "end": { "line": 20, "column": 61 } } } ], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 20, "column": 64 }, "end": { "line": 20, "column": 67 } } }, "typeParameters": { "type": "TSTypeParameterDeclaration", "params": [ { "type": "TSTypeParameter", "name": { "type": "Identifier", "name": "T", "decorators": [], "loc": { "start": { "line": 20, "column": 18 }, "end": { "line": 20, "column": 19 } } }, "constraint": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Comparable2", "decorators": [], "loc": { "start": { "line": 20, "column": 28 }, "end": { "line": 20, "column": 39 } } }, "loc": { "start": { "line": 20, "column": 28 }, "end": { "line": 20, "column": 40 } } }, "loc": { "start": { "line": 20, "column": 28 }, "end": { "line": 20, "column": 40 } } }, "loc": { "start": { "line": 20, "column": 18 }, "end": { "line": 20, "column": 40 } } } ], "loc": { "start": { "line": 20, "column": 17 }, "end": { "line": 20, "column": 40 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "==", "left": { "type": "Identifier", "name": "x", "decorators": [], "loc": { "start": { "line": 21, "column": 7 }, "end": { "line": 21, "column": 8 } } }, "right": { "type": "NullLiteral", "value": null, "loc": { "start": { "line": 21, "column": 12 }, "end": { "line": 21, "column": 16 } } }, "loc": { "start": { "line": 21, "column": 7 }, "end": { "line": 21, "column": 16 } } }, "consequent": { "type": "ReturnStatement", "argument": { "type": "ConditionalExpression", "test": { "type": "BinaryExpression", "operator": "==", "left": { "type": "Identifier", "name": "y", "decorators": [], "loc": { "start": { "line": 21, "column": 25 }, "end": { "line": 21, "column": 26 } } }, "right": { "type": "NullLiteral", "value": null, "loc": { "start": { "line": 21, "column": 30 }, "end": { "line": 21, "column": 34 } } }, "loc": { "start": { "line": 21, "column": 25 }, "end": { "line": 21, "column": 34 } } }, "consequent": { "type": "NumberLiteral", "value": 0, "loc": { "start": { "line": 21, "column": 37 }, "end": { "line": 21, "column": 38 } } }, "alternate": { "type": "UnaryExpression", "operator": "-", "prefix": true, "argument": { "type": "NumberLiteral", "value": 1, "loc": { "start": { "line": 21, "column": 42 }, "end": { "line": 21, "column": 43 } } }, "loc": { "start": { "line": 21, "column": 41 }, "end": { "line": 21, "column": 43 } } }, "loc": { "start": { "line": 21, "column": 25 }, "end": { "line": 21, "column": 43 } } }, "loc": { "start": { "line": 21, "column": 18 }, "end": { "line": 21, "column": 44 } } }, "alternate": null, "loc": { "start": { "line": 21, "column": 3 }, "end": { "line": 21, "column": 44 } } }, { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "==", "left": { "type": "Identifier", "name": "y", "decorators": [], "loc": { "start": { "line": 22, "column": 7 }, "end": { "line": 22, "column": 8 } } }, "right": { "type": "NullLiteral", "value": null, "loc": { "start": { "line": 22, "column": 12 }, "end": { "line": 22, "column": 16 } } }, "loc": { "start": { "line": 22, "column": 7 }, "end": { "line": 22, "column": 16 } } }, "consequent": { "type": "ReturnStatement", "argument": { "type": "NumberLiteral", "value": 1, "loc": { "start": { "line": 22, "column": 25 }, "end": { "line": 22, "column": 26 } } }, "loc": { "start": { "line": 22, "column": 18 }, "end": { "line": 22, "column": 27 } } }, "alternate": null, "loc": { "start": { "line": 22, "column": 3 }, "end": { "line": 22, "column": 27 } } }, { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "x", "decorators": [], "loc": { "start": { "line": 23, "column": 10 }, "end": { "line": 23, "column": 11 } } }, "property": { "type": "Identifier", "name": "localeCompare", "decorators": [], "loc": { "start": { "line": 23, "column": 12 }, "end": { "line": 23, "column": 25 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 23, "column": 10 }, "end": { "line": 23, "column": 25 } } }, "arguments": [ { "type": "Identifier", "name": "y", "decorators": [], "loc": { "start": { "line": 23, "column": 26 }, "end": { "line": 23, "column": 27 } } } ], "optional": false, "loc": { "start": { "line": 23, "column": 10 }, "end": { "line": 23, "column": 28 } } }, "loc": { "start": { "line": 23, "column": 3 }, "end": { "line": 23, "column": 29 } } } ], "loc": { "start": { "line": 20, "column": 68 }, "end": { "line": 24, "column": 2 } } }, "loc": { "start": { "line": 20, "column": 17 }, "end": { "line": 24, "column": 2 } } }, "loc": { "start": { "line": 20, "column": 17 }, "end": { "line": 24, "column": 2 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 20, "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": 1, "column": 1 }, "end": { "line": 25, "column": 1 } } }