If any entry is not a 2-tuple-like value (when no toEntryFn), or when using
the default comparator and encountering unsupported/invalid keys (e.g. NaN, invalid Date).
Example
// Standard usage with entries constmap = newTreeMap([['a', 1], ['b', 2]]);
// Using toEntryFn to transform raw objects constusers = [{ id:1, name:'Alice' }, { id:2, name:'Bob' }]; constmap = newTreeMap<number, User, User>(users, { toEntryFn:u=> [u.id, u] });
An ordered Map backed by a red-black tree.