javascript-collections-framework
    Preparing search index...

    Interface TreeMapOptions<K>

    Options for a TreeMap.

    const byLength: TreeMapOptions<string> = { comparator: (a, b) => a.length - b.length }
    const words = new TreeMap<string, number>(byLength)
    interface TreeMapOptions<K> {
        comparator?: Comparator<K>;
    }

    Type Parameters

    • K
    Index
    comparator?: Comparator<K>

    The order of the keys; two keys are the same key when it returns 0 for them. Natural order (numbers, strings, bigints, booleans, dates or [compareSymbol] objects) when omitted.