TypeError: Right-hand side of instanceof expression must represent a type. [instanceof_jsvalue_dynvalue.sts:23:12] { "type": "Program", "statements": [ { "type": "ImportDeclaration", "source": { "type": "StringLiteral", "value": "dynamic_js_import_tests", "loc": { "start": { "line": 20, "column": 19 }, "end": { "line": 20, "column": 44 } } }, "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "A", "decorators": [], "loc": { "start": { "line": 20, "column": 10 }, "end": { "line": 20, "column": 11 } } }, "imported": { "type": "Identifier", "name": "A", "decorators": [], "loc": { "start": { "line": 20, "column": 10 }, "end": { "line": 20, "column": 11 } } }, "loc": { "start": { "line": 20, "column": 10 }, "end": { "line": 20, "column": 11 } } } ], "loc": { "start": { "line": 20, "column": 1 }, "end": { "line": 20, "column": 44 } } }, { "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": 22, "column": 10 }, "end": { "line": 22, "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": 22, "column": 10 }, "end": { "line": 22, "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": 22, "column": 16 }, "end": { "line": 22, "column": 23 } } }, "loc": { "start": { "line": 22, "column": 16 }, "end": { "line": 22, "column": 24 } } }, "loc": { "start": { "line": 22, "column": 16 }, "end": { "line": 22, "column": 24 } } }, "decorators": [], "loc": { "start": { "line": 22, "column": 13 }, "end": { "line": 22, "column": 24 } } }, "loc": { "start": { "line": 22, "column": 13 }, "end": { "line": 22, "column": 24 } } } ], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 22, "column": 26 }, "end": { "line": 22, "column": 33 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "BinaryExpression", "operator": "instanceof", "left": { "type": "Identifier", "name": "o", "decorators": [], "loc": { "start": { "line": 23, "column": 12 }, "end": { "line": 23, "column": 13 } } }, "right": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "A", "decorators": [], "loc": { "start": { "line": 23, "column": 25 }, "end": { "line": 23, "column": 26 } } }, "loc": { "start": { "line": 23, "column": 25 }, "end": { "line": 23, "column": 27 } } }, "loc": { "start": { "line": 23, "column": 25 }, "end": { "line": 23, "column": 27 } } }, "loc": { "start": { "line": 23, "column": 12 }, "end": { "line": 23, "column": 27 } } }, "loc": { "start": { "line": 23, "column": 5 }, "end": { "line": 23, "column": 27 } } } ], "loc": { "start": { "line": 22, "column": 34 }, "end": { "line": 24, "column": 2 } } }, "loc": { "start": { "line": 22, "column": 12 }, "end": { "line": 24, "column": 2 } } }, "loc": { "start": { "line": 22, "column": 12 }, "end": { "line": 24, "column": 2 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 22, "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 } } }, { "type": "ClassDeclaration", "definition": { "id": { "type": "Identifier", "name": "$dynmodule", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "superClass": null, "implements": [], "body": [ { "type": "ClassProperty", "key": { "type": "Identifier", "name": "dynamic_js_import_tests0", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "accessibility": "public", "static": true, "readonly": true, "declare": false, "optional": false, "computed": false, "typeAnnotation": { "type": "OpaqueType", "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "definite": false, "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, { "type": "ClassStaticBlock", "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "generator": false, "async": false, "expression": true, "params": [], "body": { "type": "BlockStatement", "statements": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "$dynmodule", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "property": { "type": "Identifier", "name": "dynamic_js_import_tests0", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "JSRuntime", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "property": { "type": "Identifier", "name": "loadModule", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "computed": false, "optional": false, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "arguments": [ { "type": "StringLiteral", "value": "dynamic_js_import_tests", "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } } ], "optional": false, "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": 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": 1, "column": 1 } } }, { "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": [], "returnType": { "type": "OpaqueType", "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "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": 25, "column": 1 } } }