Type Alias ICompare<T>

ICompare: (a: T, b: T) => number

Compares two values.
If a comes before b, the result should be negative.
If both values are equal, the result should be zero.
If a comes after b, the result should be positive.

Type Parameters

  • T

Type declaration

    • (a: T, b: T): number
    • Parameters

      Returns number