import type { LeaderboardEntry } from '../types/benchmark'; export function hasEloInterval( entry: LeaderboardEntry, ): entry is LeaderboardEntry & { eloLo: number; eloHi: number } { return entry.eloLo !== null && entry.eloHi !== null && entry.eloHi > entry.eloLo; } export function formatEloInterval(entry: LeaderboardEntry, digits = 0): string | null { return hasEloInterval(entry) ? `[${entry.eloLo.toFixed(digits)}, ${entry.eloHi.toFixed(digits)}]` : null; }