TypeError: Right-hand side of instanceof expression must represent a type. [instanceof_jsvalue_jsvalue.sts:21:12] { "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": "fn", "decorators": [], "loc": { "start": { "line": 20, "column": 10 }, "end": { "line": 20, "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": 20, "column": 10 }, "end": { "line": 20, "column": 12 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "o", "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "JSValue", "decorators": [], "loc": { "start": { "line": 20, "column": 16 }, "end": { "line": 20, "column": 23 } } }, "loc": { "start": { "line": 20, "column": 16 }, "end": { "line": 20, "column": 24 } } }, "loc": { "start": { "line": 20, "column": 16 }, "end": { "line": 20, "column": 24 } } }, "decorators": [], "loc": { "start": { "line": 20, "column": 13 }, "end": { "line": 20, "column": 24 } } }, "loc": { "start": { "line": 20, "column": 13 }, "end": { "line": 20, "column": 24 } } } ], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 20, "column": 26 }, "end": { "line": 20, "column": 33 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "BinaryExpression", "operator": "instanceof", "left": { "type": "Identifier", "name": "o", "decorators": [], "loc": { "start": { "line": 21, "column": 12 }, "end": { "line": 21, "column": 13 } } }, "right": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "JSValue", "decorators": [], "loc": { "start": { "line": 21, "column": 25 }, "end": { "line": 21, "column": 32 } } }, "loc": { "start": { "line": 21, "column": 25 }, "end": { "line": 21, "column": 33 } } }, "loc": { "start": { "line": 21, "column": 25 }, "end": { "line": 21, "column": 33 } } }, "loc": { "start": { "line": 21, "column": 12 }, "end": { "line": 21, "column": 33 } } }, "loc": { "start": { "line": 21, "column": 5 }, "end": { "line": 21, "column": 33 } } } ], "loc": { "start": { "line": 20, "column": 34 }, "end": { "line": 22, "column": 2 } } }, "loc": { "start": { "line": 20, "column": 12 }, "end": { "line": 22, "column": 2 } } }, "loc": { "start": { "line": 20, "column": 12 }, "end": { "line": 22, "column": 2 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 20, "column": 1 }, "end": { "line": 22, "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": 23, "column": 1 } } }