refactor(documents): narrow sort prop type to full SortMode union

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-20 11:19:40 +02:00
committed by marcel
parent 2982d0f6bf
commit e79da27a12

View File

@@ -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(() => {