Comparer<T> Interface

    Package: @esfx/equatable

    Represents an object that can be used to perform a relational comparison between two values.

    Declaration
    export interface Comparer<T> 

    Methods

    compare(x, y)

    Compares two values, returning a value indicating one of the following conditions:

    • A negative value indicates x is lesser than y.
    • A positive value indicates x is greater than y.
    • A zero value indicates x and y are equivalent.
    Declaration
    compare(x: T, y: T): number;
    Parameters
    x
    T

    The first value to compare.

    y
    T

    The second value to compare.

    Returns
    number

    A number indicating the relational comparison result.

    Generated by DocFX