The compressed trie data structure.

Type Parameters

  • T

    The value stored in a trie.

Hierarchy

  • Trie

Indexable

[charCode: number]: Trie<T> | undefined

Properties

charCode: number

The char code in parent that is associated with this trie, or -1 if trie has no parent.

isLeaf: boolean

true if the trie is a leaf and has a value.

key: null | string

The key that the leaf trie represents or null for a non-leaf trie.

last: null | Trie<T>

The last child of the trie.

leafCharCodes: null | number[]

The list of remaining chars of the leaf's key.

next: null | Trie<T>

The next trie in the linked list of all nodes in the trie.

parent: null | Trie<T>

The preceding trie or null if this trie is a root.

prev: null | Trie<T>

The previous trie in the linked list of all nodes in the trie.

suggestions: null | Trie<T>[]

The list of all leafs of this trie. A memoization mechanism, populated by trieSuggest and cleaned by trieSet and trieDelete.

value: undefined | T

The value set to the trie or undefined for a non-leaf trie. Use isLeaf to distinguish between leaf and non-leaf tries.

Generated using TypeDoc