export type RankFunction = (value: T) => number | boolean;