Type alias Comparator<T>

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

Type Parameters

  • T

Type declaration

    • (a, b): number
    • Standardized comparator, which makes sorting stuff of type T via Array.prototype.sort easy and generic.

      Parameters

      • a: T
      • b: T

      Returns number

Generated using TypeDoc