• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "type": "Program",
3  "statements": [
4    {
5      "type": "TSInterfaceDeclaration",
6      "body": {
7        "type": "TSInterfaceBody",
8        "body": [
9          {
10            "type": "MethodDefinition",
11            "key": {
12              "type": "Identifier",
13              "name": "localeCompare",
14              "decorators": [],
15              "loc": {
16                "start": {
17                  "line": 17,
18                  "column": 3
19                },
20                "end": {
21                  "line": 17,
22                  "column": 16
23                }
24              }
25            },
26            "kind": "method",
27            "accessibility": "public",
28            "static": false,
29            "optional": false,
30            "computed": false,
31            "value": {
32              "type": "FunctionExpression",
33              "function": {
34                "type": "ScriptFunction",
35                "id": {
36                  "type": "Identifier",
37                  "name": "localeCompare",
38                  "decorators": [],
39                  "loc": {
40                    "start": {
41                      "line": 17,
42                      "column": 3
43                    },
44                    "end": {
45                      "line": 17,
46                      "column": 16
47                    }
48                  }
49                },
50                "generator": false,
51                "async": false,
52                "expression": false,
53                "params": [
54                  {
55                    "type": "ETSParameterExpression",
56                    "name": {
57                      "type": "Identifier",
58                      "name": "other",
59                      "typeAnnotation": {
60                        "type": "ETSUnionType",
61                        "types": [
62                          {
63                            "type": "ETSTypeReference",
64                            "part": {
65                              "type": "ETSTypeReferencePart",
66                              "name": {
67                                "type": "Identifier",
68                                "name": "Object",
69                                "decorators": [],
70                                "loc": {
71                                  "start": {
72                                    "line": 17,
73                                    "column": 24
74                                  },
75                                  "end": {
76                                    "line": 17,
77                                    "column": 30
78                                  }
79                                }
80                              },
81                              "loc": {
82                                "start": {
83                                  "line": 17,
84                                  "column": 24
85                                },
86                                "end": {
87                                  "line": 17,
88                                  "column": 31
89                                }
90                              }
91                            },
92                            "loc": {
93                              "start": {
94                                "line": 17,
95                                "column": 24
96                              },
97                              "end": {
98                                "line": 17,
99                                "column": 31
100                              }
101                            }
102                          },
103                          {
104                            "type": "ETSNullType",
105                            "loc": {
106                              "start": {
107                                "line": 17,
108                                "column": 31
109                              },
110                              "end": {
111                                "line": 17,
112                                "column": 35
113                              }
114                            }
115                          }
116                        ],
117                        "loc": {
118                          "start": {
119                            "line": 17,
120                            "column": 24
121                          },
122                          "end": {
123                            "line": 17,
124                            "column": 35
125                          }
126                        }
127                      },
128                      "decorators": [],
129                      "loc": {
130                        "start": {
131                          "line": 17,
132                          "column": 17
133                        },
134                        "end": {
135                          "line": 17,
136                          "column": 35
137                        }
138                      }
139                    },
140                    "loc": {
141                      "start": {
142                        "line": 17,
143                        "column": 17
144                      },
145                      "end": {
146                        "line": 17,
147                        "column": 35
148                      }
149                    }
150                  }
151                ],
152                "returnType": {
153                  "type": "ETSPrimitiveType",
154                  "loc": {
155                    "start": {
156                      "line": 17,
157                      "column": 38
158                    },
159                    "end": {
160                      "line": 17,
161                      "column": 41
162                    }
163                  }
164                },
165                "loc": {
166                  "start": {
167                    "line": 17,
168                    "column": 16
169                  },
170                  "end": {
171                    "line": 17,
172                    "column": 41
173                  }
174                }
175              },
176              "loc": {
177                "start": {
178                  "line": 17,
179                  "column": 16
180                },
181                "end": {
182                  "line": 17,
183                  "column": 41
184                }
185              }
186            },
187            "overloads": [],
188            "decorators": [],
189            "loc": {
190              "start": {
191                "line": 17,
192                "column": 3
193              },
194              "end": {
195                "line": 17,
196                "column": 42
197              }
198            }
199          }
200        ],
201        "loc": {
202          "start": {
203            "line": 16,
204            "column": 23
205          },
206          "end": {
207            "line": 18,
208            "column": 2
209          }
210        }
211      },
212      "id": {
213        "type": "Identifier",
214        "name": "Comparable2",
215        "decorators": [],
216        "loc": {
217          "start": {
218            "line": 16,
219            "column": 11
220          },
221          "end": {
222            "line": 16,
223            "column": 22
224          }
225        }
226      },
227      "extends": [],
228      "loc": {
229        "start": {
230          "line": 16,
231          "column": 1
232        },
233        "end": {
234          "line": 20,
235          "column": 9
236        }
237      }
238    },
239    {
240      "type": "ClassDeclaration",
241      "definition": {
242        "id": {
243          "type": "Identifier",
244          "name": "ETSGLOBAL",
245          "decorators": [],
246          "loc": {
247            "start": {
248              "line": 1,
249              "column": 1
250            },
251            "end": {
252              "line": 1,
253              "column": 1
254            }
255          }
256        },
257        "superClass": null,
258        "implements": [],
259        "body": [
260          {
261            "type": "MethodDefinition",
262            "key": {
263              "type": "Identifier",
264              "name": "_$init$_",
265              "decorators": [],
266              "loc": {
267                "start": {
268                  "line": 1,
269                  "column": 1
270                },
271                "end": {
272                  "line": 1,
273                  "column": 1
274                }
275              }
276            },
277            "kind": "method",
278            "accessibility": "public",
279            "static": true,
280            "optional": false,
281            "computed": false,
282            "value": {
283              "type": "FunctionExpression",
284              "function": {
285                "type": "ScriptFunction",
286                "id": {
287                  "type": "Identifier",
288                  "name": "_$init$_",
289                  "decorators": [],
290                  "loc": {
291                    "start": {
292                      "line": 1,
293                      "column": 1
294                    },
295                    "end": {
296                      "line": 1,
297                      "column": 1
298                    }
299                  }
300                },
301                "generator": false,
302                "async": false,
303                "expression": false,
304                "params": [],
305                "body": {
306                  "type": "BlockStatement",
307                  "statements": [],
308                  "loc": {
309                    "start": {
310                      "line": 1,
311                      "column": 1
312                    },
313                    "end": {
314                      "line": 1,
315                      "column": 1
316                    }
317                  }
318                },
319                "loc": {
320                  "start": {
321                    "line": 1,
322                    "column": 1
323                  },
324                  "end": {
325                    "line": 1,
326                    "column": 1
327                  }
328                }
329              },
330              "loc": {
331                "start": {
332                  "line": 1,
333                  "column": 1
334                },
335                "end": {
336                  "line": 1,
337                  "column": 1
338                }
339              }
340            },
341            "overloads": [],
342            "decorators": [],
343            "loc": {
344              "start": {
345                "line": 1,
346                "column": 1
347              },
348              "end": {
349                "line": 1,
350                "column": 1
351              }
352            }
353          },
354          {
355            "type": "MethodDefinition",
356            "key": {
357              "type": "Identifier",
358              "name": "compare",
359              "decorators": [],
360              "loc": {
361                "start": {
362                  "line": 20,
363                  "column": 10
364                },
365                "end": {
366                  "line": 20,
367                  "column": 17
368                }
369              }
370            },
371            "kind": "method",
372            "accessibility": "public",
373            "static": true,
374            "optional": false,
375            "computed": false,
376            "value": {
377              "type": "FunctionExpression",
378              "function": {
379                "type": "ScriptFunction",
380                "id": {
381                  "type": "Identifier",
382                  "name": "compare",
383                  "decorators": [],
384                  "loc": {
385                    "start": {
386                      "line": 20,
387                      "column": 10
388                    },
389                    "end": {
390                      "line": 20,
391                      "column": 17
392                    }
393                  }
394                },
395                "generator": false,
396                "async": false,
397                "expression": false,
398                "params": [
399                  {
400                    "type": "ETSParameterExpression",
401                    "name": {
402                      "type": "Identifier",
403                      "name": "x",
404                      "typeAnnotation": {
405                        "type": "ETSUnionType",
406                        "types": [
407                          {
408                            "type": "ETSTypeReference",
409                            "part": {
410                              "type": "ETSTypeReferencePart",
411                              "name": {
412                                "type": "Identifier",
413                                "name": "T",
414                                "decorators": [],
415                                "loc": {
416                                  "start": {
417                                    "line": 20,
418                                    "column": 44
419                                  },
420                                  "end": {
421                                    "line": 20,
422                                    "column": 45
423                                  }
424                                }
425                              },
426                              "loc": {
427                                "start": {
428                                  "line": 20,
429                                  "column": 44
430                                },
431                                "end": {
432                                  "line": 20,
433                                  "column": 46
434                                }
435                              }
436                            },
437                            "loc": {
438                              "start": {
439                                "line": 20,
440                                "column": 44
441                              },
442                              "end": {
443                                "line": 20,
444                                "column": 46
445                              }
446                            }
447                          },
448                          {
449                            "type": "ETSNullType",
450                            "loc": {
451                              "start": {
452                                "line": 20,
453                                "column": 46
454                              },
455                              "end": {
456                                "line": 20,
457                                "column": 50
458                              }
459                            }
460                          }
461                        ],
462                        "loc": {
463                          "start": {
464                            "line": 20,
465                            "column": 44
466                          },
467                          "end": {
468                            "line": 20,
469                            "column": 50
470                          }
471                        }
472                      },
473                      "decorators": [],
474                      "loc": {
475                        "start": {
476                          "line": 20,
477                          "column": 41
478                        },
479                        "end": {
480                          "line": 20,
481                          "column": 50
482                        }
483                      }
484                    },
485                    "loc": {
486                      "start": {
487                        "line": 20,
488                        "column": 41
489                      },
490                      "end": {
491                        "line": 20,
492                        "column": 50
493                      }
494                    }
495                  },
496                  {
497                    "type": "ETSParameterExpression",
498                    "name": {
499                      "type": "Identifier",
500                      "name": "y",
501                      "typeAnnotation": {
502                        "type": "ETSUnionType",
503                        "types": [
504                          {
505                            "type": "ETSTypeReference",
506                            "part": {
507                              "type": "ETSTypeReferencePart",
508                              "name": {
509                                "type": "Identifier",
510                                "name": "T",
511                                "decorators": [],
512                                "loc": {
513                                  "start": {
514                                    "line": 20,
515                                    "column": 55
516                                  },
517                                  "end": {
518                                    "line": 20,
519                                    "column": 56
520                                  }
521                                }
522                              },
523                              "loc": {
524                                "start": {
525                                  "line": 20,
526                                  "column": 55
527                                },
528                                "end": {
529                                  "line": 20,
530                                  "column": 57
531                                }
532                              }
533                            },
534                            "loc": {
535                              "start": {
536                                "line": 20,
537                                "column": 55
538                              },
539                              "end": {
540                                "line": 20,
541                                "column": 57
542                              }
543                            }
544                          },
545                          {
546                            "type": "ETSNullType",
547                            "loc": {
548                              "start": {
549                                "line": 20,
550                                "column": 57
551                              },
552                              "end": {
553                                "line": 20,
554                                "column": 61
555                              }
556                            }
557                          }
558                        ],
559                        "loc": {
560                          "start": {
561                            "line": 20,
562                            "column": 55
563                          },
564                          "end": {
565                            "line": 20,
566                            "column": 61
567                          }
568                        }
569                      },
570                      "decorators": [],
571                      "loc": {
572                        "start": {
573                          "line": 20,
574                          "column": 52
575                        },
576                        "end": {
577                          "line": 20,
578                          "column": 61
579                        }
580                      }
581                    },
582                    "loc": {
583                      "start": {
584                        "line": 20,
585                        "column": 52
586                      },
587                      "end": {
588                        "line": 20,
589                        "column": 61
590                      }
591                    }
592                  }
593                ],
594                "returnType": {
595                  "type": "ETSPrimitiveType",
596                  "loc": {
597                    "start": {
598                      "line": 20,
599                      "column": 64
600                    },
601                    "end": {
602                      "line": 20,
603                      "column": 67
604                    }
605                  }
606                },
607                "typeParameters": {
608                  "type": "TSTypeParameterDeclaration",
609                  "params": [
610                    {
611                      "type": "TSTypeParameter",
612                      "name": {
613                        "type": "Identifier",
614                        "name": "T",
615                        "decorators": [],
616                        "loc": {
617                          "start": {
618                            "line": 20,
619                            "column": 18
620                          },
621                          "end": {
622                            "line": 20,
623                            "column": 19
624                          }
625                        }
626                      },
627                      "constraint": {
628                        "type": "ETSTypeReference",
629                        "part": {
630                          "type": "ETSTypeReferencePart",
631                          "name": {
632                            "type": "Identifier",
633                            "name": "Comparable2",
634                            "decorators": [],
635                            "loc": {
636                              "start": {
637                                "line": 20,
638                                "column": 28
639                              },
640                              "end": {
641                                "line": 20,
642                                "column": 39
643                              }
644                            }
645                          },
646                          "loc": {
647                            "start": {
648                              "line": 20,
649                              "column": 28
650                            },
651                            "end": {
652                              "line": 20,
653                              "column": 40
654                            }
655                          }
656                        },
657                        "loc": {
658                          "start": {
659                            "line": 20,
660                            "column": 28
661                          },
662                          "end": {
663                            "line": 20,
664                            "column": 40
665                          }
666                        }
667                      },
668                      "loc": {
669                        "start": {
670                          "line": 20,
671                          "column": 18
672                        },
673                        "end": {
674                          "line": 20,
675                          "column": 40
676                        }
677                      }
678                    }
679                  ],
680                  "loc": {
681                    "start": {
682                      "line": 20,
683                      "column": 17
684                    },
685                    "end": {
686                      "line": 20,
687                      "column": 40
688                    }
689                  }
690                },
691                "body": {
692                  "type": "BlockStatement",
693                  "statements": [
694                    {
695                      "type": "IfStatement",
696                      "test": {
697                        "type": "BinaryExpression",
698                        "operator": "==",
699                        "left": {
700                          "type": "Identifier",
701                          "name": "x",
702                          "decorators": [],
703                          "loc": {
704                            "start": {
705                              "line": 21,
706                              "column": 7
707                            },
708                            "end": {
709                              "line": 21,
710                              "column": 8
711                            }
712                          }
713                        },
714                        "right": {
715                          "type": "NullLiteral",
716                          "value": null,
717                          "loc": {
718                            "start": {
719                              "line": 21,
720                              "column": 12
721                            },
722                            "end": {
723                              "line": 21,
724                              "column": 16
725                            }
726                          }
727                        },
728                        "loc": {
729                          "start": {
730                            "line": 21,
731                            "column": 7
732                          },
733                          "end": {
734                            "line": 21,
735                            "column": 16
736                          }
737                        }
738                      },
739                      "consequent": {
740                        "type": "ReturnStatement",
741                        "argument": {
742                          "type": "ConditionalExpression",
743                          "test": {
744                            "type": "BinaryExpression",
745                            "operator": "==",
746                            "left": {
747                              "type": "Identifier",
748                              "name": "y",
749                              "decorators": [],
750                              "loc": {
751                                "start": {
752                                  "line": 21,
753                                  "column": 25
754                                },
755                                "end": {
756                                  "line": 21,
757                                  "column": 26
758                                }
759                              }
760                            },
761                            "right": {
762                              "type": "NullLiteral",
763                              "value": null,
764                              "loc": {
765                                "start": {
766                                  "line": 21,
767                                  "column": 30
768                                },
769                                "end": {
770                                  "line": 21,
771                                  "column": 34
772                                }
773                              }
774                            },
775                            "loc": {
776                              "start": {
777                                "line": 21,
778                                "column": 25
779                              },
780                              "end": {
781                                "line": 21,
782                                "column": 34
783                              }
784                            }
785                          },
786                          "consequent": {
787                            "type": "NumberLiteral",
788                            "value": 0,
789                            "loc": {
790                              "start": {
791                                "line": 21,
792                                "column": 37
793                              },
794                              "end": {
795                                "line": 21,
796                                "column": 38
797                              }
798                            }
799                          },
800                          "alternate": {
801                            "type": "NumberLiteral",
802                            "value": -1,
803                            "loc": {
804                              "start": {
805                                "line": 21,
806                                "column": 41
807                              },
808                              "end": {
809                                "line": 21,
810                                "column": 43
811                              }
812                            }
813                          },
814                          "loc": {
815                            "start": {
816                              "line": 21,
817                              "column": 25
818                            },
819                            "end": {
820                              "line": 21,
821                              "column": 43
822                            }
823                          }
824                        },
825                        "loc": {
826                          "start": {
827                            "line": 21,
828                            "column": 18
829                          },
830                          "end": {
831                            "line": 21,
832                            "column": 44
833                          }
834                        }
835                      },
836                      "alternate": null,
837                      "loc": {
838                        "start": {
839                          "line": 21,
840                          "column": 3
841                        },
842                        "end": {
843                          "line": 21,
844                          "column": 44
845                        }
846                      }
847                    },
848                    {
849                      "type": "IfStatement",
850                      "test": {
851                        "type": "BinaryExpression",
852                        "operator": "==",
853                        "left": {
854                          "type": "Identifier",
855                          "name": "y",
856                          "decorators": [],
857                          "loc": {
858                            "start": {
859                              "line": 22,
860                              "column": 7
861                            },
862                            "end": {
863                              "line": 22,
864                              "column": 8
865                            }
866                          }
867                        },
868                        "right": {
869                          "type": "NullLiteral",
870                          "value": null,
871                          "loc": {
872                            "start": {
873                              "line": 22,
874                              "column": 12
875                            },
876                            "end": {
877                              "line": 22,
878                              "column": 16
879                            }
880                          }
881                        },
882                        "loc": {
883                          "start": {
884                            "line": 22,
885                            "column": 7
886                          },
887                          "end": {
888                            "line": 22,
889                            "column": 16
890                          }
891                        }
892                      },
893                      "consequent": {
894                        "type": "ReturnStatement",
895                        "argument": {
896                          "type": "NumberLiteral",
897                          "value": 1,
898                          "loc": {
899                            "start": {
900                              "line": 22,
901                              "column": 25
902                            },
903                            "end": {
904                              "line": 22,
905                              "column": 26
906                            }
907                          }
908                        },
909                        "loc": {
910                          "start": {
911                            "line": 22,
912                            "column": 18
913                          },
914                          "end": {
915                            "line": 22,
916                            "column": 27
917                          }
918                        }
919                      },
920                      "alternate": null,
921                      "loc": {
922                        "start": {
923                          "line": 22,
924                          "column": 3
925                        },
926                        "end": {
927                          "line": 22,
928                          "column": 27
929                        }
930                      }
931                    },
932                    {
933                      "type": "ReturnStatement",
934                      "argument": {
935                        "type": "CallExpression",
936                        "callee": {
937                          "type": "MemberExpression",
938                          "object": {
939                            "type": "Identifier",
940                            "name": "x",
941                            "decorators": [],
942                            "loc": {
943                              "start": {
944                                "line": 23,
945                                "column": 10
946                              },
947                              "end": {
948                                "line": 23,
949                                "column": 11
950                              }
951                            }
952                          },
953                          "property": {
954                            "type": "Identifier",
955                            "name": "localeCompare",
956                            "decorators": [],
957                            "loc": {
958                              "start": {
959                                "line": 23,
960                                "column": 12
961                              },
962                              "end": {
963                                "line": 23,
964                                "column": 25
965                              }
966                            }
967                          },
968                          "computed": false,
969                          "optional": false,
970                          "loc": {
971                            "start": {
972                              "line": 23,
973                              "column": 10
974                            },
975                            "end": {
976                              "line": 23,
977                              "column": 25
978                            }
979                          }
980                        },
981                        "arguments": [
982                          {
983                            "type": "Identifier",
984                            "name": "y",
985                            "decorators": [],
986                            "loc": {
987                              "start": {
988                                "line": 23,
989                                "column": 26
990                              },
991                              "end": {
992                                "line": 23,
993                                "column": 27
994                              }
995                            }
996                          }
997                        ],
998                        "optional": false,
999                        "loc": {
1000                          "start": {
1001                            "line": 23,
1002                            "column": 10
1003                          },
1004                          "end": {
1005                            "line": 23,
1006                            "column": 28
1007                          }
1008                        }
1009                      },
1010                      "loc": {
1011                        "start": {
1012                          "line": 23,
1013                          "column": 3
1014                        },
1015                        "end": {
1016                          "line": 23,
1017                          "column": 29
1018                        }
1019                      }
1020                    }
1021                  ],
1022                  "loc": {
1023                    "start": {
1024                      "line": 20,
1025                      "column": 68
1026                    },
1027                    "end": {
1028                      "line": 24,
1029                      "column": 2
1030                    }
1031                  }
1032                },
1033                "loc": {
1034                  "start": {
1035                    "line": 20,
1036                    "column": 10
1037                  },
1038                  "end": {
1039                    "line": 24,
1040                    "column": 2
1041                  }
1042                }
1043              },
1044              "loc": {
1045                "start": {
1046                  "line": 20,
1047                  "column": 10
1048                },
1049                "end": {
1050                  "line": 24,
1051                  "column": 2
1052                }
1053              }
1054            },
1055            "overloads": [],
1056            "decorators": [],
1057            "loc": {
1058              "start": {
1059                "line": 20,
1060                "column": 1
1061              },
1062              "end": {
1063                "line": 24,
1064                "column": 2
1065              }
1066            }
1067          }
1068        ],
1069        "loc": {
1070          "start": {
1071            "line": 1,
1072            "column": 1
1073          },
1074          "end": {
1075            "line": 1,
1076            "column": 1
1077          }
1078        }
1079      },
1080      "loc": {
1081        "start": {
1082          "line": 1,
1083          "column": 1
1084        },
1085        "end": {
1086          "line": 1,
1087          "column": 1
1088        }
1089      }
1090    }
1091  ],
1092  "loc": {
1093    "start": {
1094      "line": 1,
1095      "column": 1
1096    },
1097    "end": {
1098      "line": 25,
1099      "column": 1
1100    }
1101  }
1102}
1103