1TypeError: Right-hand side of instanceof expression must represent a type. [instanceof_dynvalue_jsvalue.sts:23:12] 2{ 3 "type": "Program", 4 "statements": [ 5 { 6 "type": "ImportDeclaration", 7 "source": { 8 "type": "StringLiteral", 9 "value": "dynamic_js_import_tests", 10 "loc": { 11 "start": { 12 "line": 20, 13 "column": 19 14 }, 15 "end": { 16 "line": 20, 17 "column": 44 18 } 19 } 20 }, 21 "specifiers": [ 22 { 23 "type": "ImportSpecifier", 24 "local": { 25 "type": "Identifier", 26 "name": "A", 27 "decorators": [], 28 "loc": { 29 "start": { 30 "line": 20, 31 "column": 10 32 }, 33 "end": { 34 "line": 20, 35 "column": 11 36 } 37 } 38 }, 39 "imported": { 40 "type": "Identifier", 41 "name": "A", 42 "decorators": [], 43 "loc": { 44 "start": { 45 "line": 20, 46 "column": 10 47 }, 48 "end": { 49 "line": 20, 50 "column": 11 51 } 52 } 53 }, 54 "loc": { 55 "start": { 56 "line": 20, 57 "column": 10 58 }, 59 "end": { 60 "line": 20, 61 "column": 11 62 } 63 } 64 } 65 ], 66 "loc": { 67 "start": { 68 "line": 20, 69 "column": 1 70 }, 71 "end": { 72 "line": 20, 73 "column": 44 74 } 75 } 76 }, 77 { 78 "type": "ClassDeclaration", 79 "definition": { 80 "id": { 81 "type": "Identifier", 82 "name": "ETSGLOBAL", 83 "decorators": [], 84 "loc": { 85 "start": { 86 "line": 1, 87 "column": 1 88 }, 89 "end": { 90 "line": 1, 91 "column": 1 92 } 93 } 94 }, 95 "superClass": null, 96 "implements": [], 97 "body": [ 98 { 99 "type": "MethodDefinition", 100 "key": { 101 "type": "Identifier", 102 "name": "_$init$_", 103 "decorators": [], 104 "loc": { 105 "start": { 106 "line": 1, 107 "column": 1 108 }, 109 "end": { 110 "line": 1, 111 "column": 1 112 } 113 } 114 }, 115 "kind": "method", 116 "accessibility": "public", 117 "static": true, 118 "optional": false, 119 "computed": false, 120 "value": { 121 "type": "FunctionExpression", 122 "function": { 123 "type": "ScriptFunction", 124 "id": { 125 "type": "Identifier", 126 "name": "_$init$_", 127 "decorators": [], 128 "loc": { 129 "start": { 130 "line": 1, 131 "column": 1 132 }, 133 "end": { 134 "line": 1, 135 "column": 1 136 } 137 } 138 }, 139 "generator": false, 140 "async": false, 141 "expression": false, 142 "params": [], 143 "body": { 144 "type": "BlockStatement", 145 "statements": [], 146 "loc": { 147 "start": { 148 "line": 1, 149 "column": 1 150 }, 151 "end": { 152 "line": 1, 153 "column": 1 154 } 155 } 156 }, 157 "loc": { 158 "start": { 159 "line": 1, 160 "column": 1 161 }, 162 "end": { 163 "line": 1, 164 "column": 1 165 } 166 } 167 }, 168 "loc": { 169 "start": { 170 "line": 1, 171 "column": 1 172 }, 173 "end": { 174 "line": 1, 175 "column": 1 176 } 177 } 178 }, 179 "overloads": [], 180 "decorators": [], 181 "loc": { 182 "start": { 183 "line": 1, 184 "column": 1 185 }, 186 "end": { 187 "line": 1, 188 "column": 1 189 } 190 } 191 }, 192 { 193 "type": "MethodDefinition", 194 "key": { 195 "type": "Identifier", 196 "name": "fn", 197 "decorators": [], 198 "loc": { 199 "start": { 200 "line": 22, 201 "column": 10 202 }, 203 "end": { 204 "line": 22, 205 "column": 12 206 } 207 } 208 }, 209 "kind": "method", 210 "accessibility": "public", 211 "static": true, 212 "optional": false, 213 "computed": false, 214 "value": { 215 "type": "FunctionExpression", 216 "function": { 217 "type": "ScriptFunction", 218 "id": { 219 "type": "Identifier", 220 "name": "fn", 221 "decorators": [], 222 "loc": { 223 "start": { 224 "line": 22, 225 "column": 10 226 }, 227 "end": { 228 "line": 22, 229 "column": 12 230 } 231 } 232 }, 233 "generator": false, 234 "async": false, 235 "expression": false, 236 "params": [ 237 { 238 "type": "ETSParameterExpression", 239 "name": { 240 "type": "Identifier", 241 "name": "o", 242 "typeAnnotation": { 243 "type": "ETSTypeReference", 244 "part": { 245 "type": "ETSTypeReferencePart", 246 "name": { 247 "type": "Identifier", 248 "name": "A", 249 "decorators": [], 250 "loc": { 251 "start": { 252 "line": 22, 253 "column": 16 254 }, 255 "end": { 256 "line": 22, 257 "column": 17 258 } 259 } 260 }, 261 "loc": { 262 "start": { 263 "line": 22, 264 "column": 16 265 }, 266 "end": { 267 "line": 22, 268 "column": 18 269 } 270 } 271 }, 272 "loc": { 273 "start": { 274 "line": 22, 275 "column": 16 276 }, 277 "end": { 278 "line": 22, 279 "column": 18 280 } 281 } 282 }, 283 "decorators": [], 284 "loc": { 285 "start": { 286 "line": 22, 287 "column": 13 288 }, 289 "end": { 290 "line": 22, 291 "column": 18 292 } 293 } 294 }, 295 "loc": { 296 "start": { 297 "line": 22, 298 "column": 13 299 }, 300 "end": { 301 "line": 22, 302 "column": 18 303 } 304 } 305 } 306 ], 307 "returnType": { 308 "type": "ETSPrimitiveType", 309 "loc": { 310 "start": { 311 "line": 22, 312 "column": 20 313 }, 314 "end": { 315 "line": 22, 316 "column": 27 317 } 318 } 319 }, 320 "body": { 321 "type": "BlockStatement", 322 "statements": [ 323 { 324 "type": "ReturnStatement", 325 "argument": { 326 "type": "BinaryExpression", 327 "operator": "instanceof", 328 "left": { 329 "type": "Identifier", 330 "name": "o", 331 "decorators": [], 332 "loc": { 333 "start": { 334 "line": 23, 335 "column": 12 336 }, 337 "end": { 338 "line": 23, 339 "column": 13 340 } 341 } 342 }, 343 "right": { 344 "type": "ETSTypeReference", 345 "part": { 346 "type": "ETSTypeReferencePart", 347 "name": { 348 "type": "Identifier", 349 "name": "JSValue", 350 "decorators": [], 351 "loc": { 352 "start": { 353 "line": 23, 354 "column": 25 355 }, 356 "end": { 357 "line": 23, 358 "column": 32 359 } 360 } 361 }, 362 "loc": { 363 "start": { 364 "line": 23, 365 "column": 25 366 }, 367 "end": { 368 "line": 23, 369 "column": 33 370 } 371 } 372 }, 373 "loc": { 374 "start": { 375 "line": 23, 376 "column": 25 377 }, 378 "end": { 379 "line": 23, 380 "column": 33 381 } 382 } 383 }, 384 "loc": { 385 "start": { 386 "line": 23, 387 "column": 12 388 }, 389 "end": { 390 "line": 23, 391 "column": 33 392 } 393 } 394 }, 395 "loc": { 396 "start": { 397 "line": 23, 398 "column": 5 399 }, 400 "end": { 401 "line": 23, 402 "column": 33 403 } 404 } 405 } 406 ], 407 "loc": { 408 "start": { 409 "line": 22, 410 "column": 28 411 }, 412 "end": { 413 "line": 24, 414 "column": 2 415 } 416 } 417 }, 418 "loc": { 419 "start": { 420 "line": 22, 421 "column": 12 422 }, 423 "end": { 424 "line": 24, 425 "column": 2 426 } 427 } 428 }, 429 "loc": { 430 "start": { 431 "line": 22, 432 "column": 12 433 }, 434 "end": { 435 "line": 24, 436 "column": 2 437 } 438 } 439 }, 440 "overloads": [], 441 "decorators": [], 442 "loc": { 443 "start": { 444 "line": 22, 445 "column": 1 446 }, 447 "end": { 448 "line": 24, 449 "column": 2 450 } 451 } 452 } 453 ], 454 "loc": { 455 "start": { 456 "line": 1, 457 "column": 1 458 }, 459 "end": { 460 "line": 1, 461 "column": 1 462 } 463 } 464 }, 465 "loc": { 466 "start": { 467 "line": 1, 468 "column": 1 469 }, 470 "end": { 471 "line": 1, 472 "column": 1 473 } 474 } 475 }, 476 { 477 "type": "ClassDeclaration", 478 "definition": { 479 "id": { 480 "type": "Identifier", 481 "name": "$dynmodule", 482 "decorators": [], 483 "loc": { 484 "start": { 485 "line": 1, 486 "column": 1 487 }, 488 "end": { 489 "line": 1, 490 "column": 1 491 } 492 } 493 }, 494 "superClass": null, 495 "implements": [], 496 "body": [ 497 { 498 "type": "ClassProperty", 499 "key": { 500 "type": "Identifier", 501 "name": "dynamic_js_import_tests0", 502 "decorators": [], 503 "loc": { 504 "start": { 505 "line": 1, 506 "column": 1 507 }, 508 "end": { 509 "line": 1, 510 "column": 1 511 } 512 } 513 }, 514 "accessibility": "public", 515 "static": true, 516 "readonly": true, 517 "declare": false, 518 "optional": false, 519 "computed": false, 520 "typeAnnotation": { 521 "type": "OpaqueType", 522 "loc": { 523 "start": { 524 "line": 1, 525 "column": 1 526 }, 527 "end": { 528 "line": 1, 529 "column": 1 530 } 531 } 532 }, 533 "definite": false, 534 "decorators": [], 535 "loc": { 536 "start": { 537 "line": 1, 538 "column": 1 539 }, 540 "end": { 541 "line": 1, 542 "column": 1 543 } 544 } 545 }, 546 { 547 "type": "ClassStaticBlock", 548 "value": { 549 "type": "FunctionExpression", 550 "function": { 551 "type": "ScriptFunction", 552 "id": { 553 "type": "Identifier", 554 "name": "<cctor>", 555 "decorators": [], 556 "loc": { 557 "start": { 558 "line": 1, 559 "column": 1 560 }, 561 "end": { 562 "line": 1, 563 "column": 1 564 } 565 } 566 }, 567 "generator": false, 568 "async": false, 569 "expression": true, 570 "params": [], 571 "body": { 572 "type": "BlockStatement", 573 "statements": [ 574 { 575 "type": "ExpressionStatement", 576 "expression": { 577 "type": "AssignmentExpression", 578 "operator": "=", 579 "left": { 580 "type": "MemberExpression", 581 "object": { 582 "type": "Identifier", 583 "name": "$dynmodule", 584 "decorators": [], 585 "loc": { 586 "start": { 587 "line": 1, 588 "column": 1 589 }, 590 "end": { 591 "line": 1, 592 "column": 1 593 } 594 } 595 }, 596 "property": { 597 "type": "Identifier", 598 "name": "dynamic_js_import_tests0", 599 "decorators": [], 600 "loc": { 601 "start": { 602 "line": 1, 603 "column": 1 604 }, 605 "end": { 606 "line": 1, 607 "column": 1 608 } 609 } 610 }, 611 "computed": false, 612 "optional": false, 613 "loc": { 614 "start": { 615 "line": 1, 616 "column": 1 617 }, 618 "end": { 619 "line": 1, 620 "column": 1 621 } 622 } 623 }, 624 "right": { 625 "type": "CallExpression", 626 "callee": { 627 "type": "MemberExpression", 628 "object": { 629 "type": "Identifier", 630 "name": "JSRuntime", 631 "decorators": [], 632 "loc": { 633 "start": { 634 "line": 1, 635 "column": 1 636 }, 637 "end": { 638 "line": 1, 639 "column": 1 640 } 641 } 642 }, 643 "property": { 644 "type": "Identifier", 645 "name": "loadModule", 646 "decorators": [], 647 "loc": { 648 "start": { 649 "line": 1, 650 "column": 1 651 }, 652 "end": { 653 "line": 1, 654 "column": 1 655 } 656 } 657 }, 658 "computed": false, 659 "optional": false, 660 "loc": { 661 "start": { 662 "line": 1, 663 "column": 1 664 }, 665 "end": { 666 "line": 1, 667 "column": 1 668 } 669 } 670 }, 671 "arguments": [ 672 { 673 "type": "StringLiteral", 674 "value": "dynamic_js_import_tests", 675 "loc": { 676 "start": { 677 "line": 1, 678 "column": 1 679 }, 680 "end": { 681 "line": 1, 682 "column": 1 683 } 684 } 685 } 686 ], 687 "optional": false, 688 "loc": { 689 "start": { 690 "line": 1, 691 "column": 1 692 }, 693 "end": { 694 "line": 1, 695 "column": 1 696 } 697 } 698 }, 699 "loc": { 700 "start": { 701 "line": 1, 702 "column": 1 703 }, 704 "end": { 705 "line": 1, 706 "column": 1 707 } 708 } 709 }, 710 "loc": { 711 "start": { 712 "line": 1, 713 "column": 1 714 }, 715 "end": { 716 "line": 1, 717 "column": 1 718 } 719 } 720 } 721 ], 722 "loc": { 723 "start": { 724 "line": 1, 725 "column": 1 726 }, 727 "end": { 728 "line": 1, 729 "column": 1 730 } 731 } 732 }, 733 "loc": { 734 "start": { 735 "line": 1, 736 "column": 1 737 }, 738 "end": { 739 "line": 1, 740 "column": 1 741 } 742 } 743 }, 744 "loc": { 745 "start": { 746 "line": 1, 747 "column": 1 748 }, 749 "end": { 750 "line": 1, 751 "column": 1 752 } 753 } 754 }, 755 "loc": { 756 "start": { 757 "line": 1, 758 "column": 1 759 }, 760 "end": { 761 "line": 1, 762 "column": 1 763 } 764 } 765 }, 766 { 767 "type": "MethodDefinition", 768 "key": { 769 "type": "Identifier", 770 "name": "init", 771 "decorators": [], 772 "loc": { 773 "start": { 774 "line": 1, 775 "column": 1 776 }, 777 "end": { 778 "line": 1, 779 "column": 1 780 } 781 } 782 }, 783 "kind": "method", 784 "accessibility": "public", 785 "static": true, 786 "optional": false, 787 "computed": false, 788 "value": { 789 "type": "FunctionExpression", 790 "function": { 791 "type": "ScriptFunction", 792 "id": { 793 "type": "Identifier", 794 "name": "init", 795 "decorators": [], 796 "loc": { 797 "start": { 798 "line": 1, 799 "column": 1 800 }, 801 "end": { 802 "line": 1, 803 "column": 1 804 } 805 } 806 }, 807 "generator": false, 808 "async": false, 809 "expression": false, 810 "params": [], 811 "returnType": { 812 "type": "OpaqueType", 813 "loc": { 814 "start": { 815 "line": 1, 816 "column": 1 817 }, 818 "end": { 819 "line": 1, 820 "column": 1 821 } 822 } 823 }, 824 "body": { 825 "type": "BlockStatement", 826 "statements": [], 827 "loc": { 828 "start": { 829 "line": 1, 830 "column": 1 831 }, 832 "end": { 833 "line": 1, 834 "column": 1 835 } 836 } 837 }, 838 "loc": { 839 "start": { 840 "line": 1, 841 "column": 1 842 }, 843 "end": { 844 "line": 1, 845 "column": 1 846 } 847 } 848 }, 849 "loc": { 850 "start": { 851 "line": 1, 852 "column": 1 853 }, 854 "end": { 855 "line": 1, 856 "column": 1 857 } 858 } 859 }, 860 "overloads": [], 861 "decorators": [], 862 "loc": { 863 "start": { 864 "line": 1, 865 "column": 1 866 }, 867 "end": { 868 "line": 1, 869 "column": 1 870 } 871 } 872 } 873 ], 874 "loc": { 875 "start": { 876 "line": 1, 877 "column": 1 878 }, 879 "end": { 880 "line": 1, 881 "column": 1 882 } 883 } 884 }, 885 "loc": { 886 "start": { 887 "line": 1, 888 "column": 1 889 }, 890 "end": { 891 "line": 1, 892 "column": 1 893 } 894 } 895 } 896 ], 897 "loc": { 898 "start": { 899 "line": 1, 900 "column": 1 901 }, 902 "end": { 903 "line": 25, 904 "column": 1 905 } 906 } 907} 908