Compares objects of the same type using a custom selector and a comparer for the selector's return value.

Type Parameters

  • T

  • TProperty

Hierarchy

  • default

Implements

Constructors

  • Type Parameters

    • T

    • TProperty

    Parameters

    • selector: ((a) => TProperty)
        • (a): TProperty
        • Parameters

          • a: T

          Returns TProperty

    • comparer: IComparer<TProperty>

    Returns default<T, TProperty>

Properties

#comparer: IComparer<TProperty>
#selector: ((a) => TProperty)

Type declaration

    • (a): TProperty
    • Parameters

      • a: T

      Returns TProperty

Methods

  • Compares 'x' to 'y' where the following rules apply;

    • x < y : return <0
    • x == y : return 0
    • x > y : return >0

    Parameters

    • x: T
    • y: T

    Returns number

Generated using TypeDoc