import { KeyedMapFn } from '@collectable/core'; import { RedBlackTreeEntry, RedBlackTreeStructure } from '../internals'; /** * Returns an array of key/value tuples. Keys appear first in each tuple, followed by the associated value in the tree. * The array is guaranteed to be in the same order as the corresponding entries in the tree. * * @export * @template K The type of keys in the tree * @template V The type of values in the tree * @param {RedBlackTreeStructure} tree The tree to read values from * @returns {RedBlackTreeEntry[]} An array of key/value pairs from the tree */ export declare function toArray(tree: RedBlackTreeStructure): RedBlackTreeEntry[]; /** * Maps the contents of the tree to an array of transformed values. The array is guaranteed to be in the same order as * the corresponding entries in the tree. * * @export * @template K The type of keys in the tree * @template V The type of values in the tree * @template U The type of value that will be populated into the returned array * @param {KeyedMapFn} mapper A callback function that maps an entry in the tree to a new value * @param {RedBlackTreeStructure} tree The tree to read values from * @returns {U[]} An array of transformed values; one for each entry in the tree */ export declare function toArray(mapper: KeyedMapFn, tree: RedBlackTreeStructure): U[];