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:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user