Type Parameters

  • T

  • R

Hierarchy

  • ISorter
  • Parameters

    • a: T
    • b: T

    Returns number

Methods

  • Sets a fallback sorter for when two items are in the same position

    Type Parameters

    • A extends any[]

    Parameters

    • Optional fallback: SortFallback<T, R, A>
    • Rest ...args: A

    Returns ISorter<T, R>

  • Sets a custom entry mapper, which takes an item to sort and returns a string or number representing its "sort value", which is what is actually compared.

    These values are cached by the sorter

    Type Parameters

    • A extends any[]

    Parameters

    • mapper: EntryMapper<T, R, A>
    • Rest ...args: A

    Returns ISorter<T, R>

  • Sets this sort to be reversed

    Returns ISorter<T, R>

  • Sets whether this sort should be reversed

    Parameters

    • reverse: boolean

    Returns ISorter<T, R>

  • Sets a custom sorter to override the default sort functionality

    Note: When a custom sorter is used, fallbacks registered in setFallback will not be.

    Type Parameters

    • A extends any[]

    Parameters

    • Optional sorter: SortFallback<T, R, A>
    • Rest ...args: A

    Returns ISorter<T, R>

Generated using TypeDoc