From e79da27a12db50a7216d198df76b342fb0318760 Mon Sep 17 00:00:00 2001 From: Marcel Date: Mon, 20 Apr 2026 11:19:40 +0200 Subject: [PATCH] refactor(documents): narrow sort prop type to full SortMode union Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/routes/DocumentList.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/routes/DocumentList.svelte b/frontend/src/routes/DocumentList.svelte index 76f8195a..dad41528 100644 --- a/frontend/src/routes/DocumentList.svelte +++ b/frontend/src/routes/DocumentList.svelte @@ -7,6 +7,8 @@ import type { components } from '$lib/generated/api'; type DocumentSearchItem = components['schemas']['DocumentSearchItem']; +type SortMode = 'DATE' | 'TITLE' | 'SENDER' | 'RECEIVER' | 'UPLOAD_DATE' | 'RELEVANCE'; + let { items, canWrite, @@ -20,7 +22,7 @@ let { error?: string | null; total?: number; q?: string; - sort?: string; + sort?: SortMode; } = $props(); const groups = $derived.by(() => {