Type alias CompareFunction<T>

CompareFunction<T>: ((a: T, b: T) => number)

Type Parameters

  • T

Type declaration

    • (a: T, b: T): number
    • Handle comparison of two values.

      Returns

      a<b: -ve, a=b: 0, a>b: +ve

      Parameters

      • a: T

        a value

      • b: T

        another value

      Returns number

Generated using TypeDoc