Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. 🫖 Status page with uptime monitoring & API monitoring as code 🫖 openstatus.dev
Something went wrong. Try again.
369 B · 13 lines
TypeScript
1234567891011121314import type { Theme } from "./types";
export function assertUniqueThemeIds(themes: Theme[]) { const seen = new Set<string>(); for (const theme of themes) { if (seen.has(theme.id)) { throw new Error( `Duplicate theme ID detected: "${theme.id}" in theme "${theme.name}". All theme IDs must be unique.`, ); } seen.add(theme.id); }}