From dc4db405d2991d3ec6a114f3b08d3fccd057d3ee Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Thu, 13 Feb 2025 17:52:16 +0100 Subject: frontend: Migrate to Svelte 5 --- frontend/src/lib/Enums.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'frontend/src/lib/Enums.ts') diff --git a/frontend/src/lib/Enums.ts b/frontend/src/lib/Enums.ts index 876aec8..3264de4 100644 --- a/frontend/src/lib/Enums.ts +++ b/frontend/src/lib/Enums.ts @@ -15,6 +15,7 @@ import { UpdateMode, WorldSort } from '$gql/graphql'; +import type { Key } from './Utils'; export interface EnumOption { id: T; @@ -318,8 +319,6 @@ export const censorships: EnumOption[] = optionsFromLabel(Censorship export const categories: EnumOption[] = optionsFromLabel(CategoryLabel); export const languages: EnumOption[] = optionsFromLabel(LanguageLabel); -function optionsFromLabel( - labels: Record -): EnumOption[] { +function optionsFromLabel(labels: Record): EnumOption[] { return Object.entries(labels).map(([k, v]) => ({ id: k as T, name: v as string })); } -- cgit v1.2.3-2-gb3c3