Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • T

  • K = T

Hierarchy

  • TreeIndexOptions

Index

Properties

Optional allowDuplicates

allowDuplicates: boolean

Set to false to prevent an element with the same key for which isEqual returns true to be added to the collection.

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

Exctracts 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

Legend

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

Generated using TypeDoc