interface Comparable<TOther> {
    compare: ((other) => number);
}

Type Parameters

  • TOther

Implemented by

Properties

Properties

compare: ((other) => number)

Compare one object with another.

The purpose of this method is not to test for equality, but have deterministic comparability. As long as this method is deterministic, there is no need for a proper ordering in any result/downstream.

Type declaration

    • (other): number
    • Parameters

      Returns number