--- import type { StarlightRouteData } from "@astrojs/starlight/route-data"; type Entry = StarlightRouteData["sidebar"][number]; interface Props { entries: Entry[]; depth?: number; } const { entries, depth = 0 } = Astro.props; const hasCurrent = (entry: Entry): boolean => entry.type === "link" ? entry.isCurrent : entry.entries.some(hasCurrent); ---