/**
 *  Returns a new array that contains as many values as possible
 *  within the same location as previous array.
 *  We also try to reuse indexes by type and never return a array smaller than the old array unless items have been completely removed.
 */
export default function getStableArray<T>(oldValues: T[], newSet: Set<T>, oldTypes?: (value: T) => any, newTypes?: (value: T) => any): T[];
