Comparer<T>

Description

A Comparer is an interface that represents a function that compares two values and returns a number to indicate the result.

Typescript

It has the following signature:

    (x: T, y: T): number

Remarks

Implementations must return -1 if x < y, 0 if x = y, 1 if x > y.