• Public
  • Public/Protected
  • All

Type parameters

  • T

  • K = T


  • BSTreeIndexOptions<T, K>
    • RBTreeIndexOptions



Optional compareKeys

compareKeys: (a: K, b: K) => boolean

Compares two keys and returns whether the first key is less than the second.

If left unspecified, a default function will be chosen that works on most keys.

Type declaration

    • (a: K, b: K): boolean
    • Parameters

      • a: K
      • b: K

      Returns boolean

Optional elements

elements: Iterable<T>

An iterable that will be consumed to fill the collection.

Optional getKey

getKey: (elements: T) => K

Extracts the key part of the element.

Type declaration

    • (elements: T): K
    • Parameters

      • elements: T

      Returns K

Optional isEqual

isEqual: (a: T, b: T) => boolean

Used for checking two elements with the same key in the collection.

Type declaration

    • (a: T, b: T): boolean
    • Parameters

      • a: T
      • b: T

      Returns boolean

Optional onDuplicateElements

onDuplicateElements: ResolveAction

Optional onDuplicateKeys

onDuplicateKeys: ResolveAction

Set to false to prevent an element with the same key to be added to the collection.


  • Property
  • Method
  • Accessor
  • Property
  • Method
  • Inherited property
  • Inherited method

Generated using TypeDoc