API ReferenceCore Interfaces & TypesComparableOn this pageComparable Interface for objects that can be compared for ordering Implementing this interface allows custom classes to define their own comparison logic Methods compare() compare(other: T): number