Openstatus
www.openstatus.dev
1import type { Theme } from "./types";
2
3export function assertUniqueThemeIds(themes: Theme[]) {
4 const seen = new Set<string>();
5 for (const theme of themes) {
6 if (seen.has(theme.id)) {
7 throw new Error(
8 `Duplicate theme ID detected: "${theme.id}" in theme "${theme.name}". All theme IDs must be unique.`,
9 );
10 }
11 seen.add(theme.id);
12 }
13}