refactor: introduce dedicated identifier types for improved clarity and type safety

This commit is contained in:
2025-11-24 23:47:36 +01:00
parent 22f0c040a2
commit 70e7bda87e
79 changed files with 1567 additions and 1572 deletions
+4 -4
View File
@@ -10,8 +10,8 @@ interface SelectionEntry {
}
interface WorkspaceSelectionOptions {
onDocumentActivate?: (id: string | number) => void;
onInspectFolder?: (id: string | number) => void;
onDocumentActivate?: (id: string) => void;
onInspectFolder?: (id: string) => void;
}
const identity = <T,>(value: T) => value;
@@ -71,7 +71,7 @@ export const useWorkspaceSelection = ({
);
const inspectDocument = useCallback(
(documentId?: string | number) => {
(documentId?: string) => {
if (!documentId) return;
onDocumentActivate(documentId);
},
@@ -79,7 +79,7 @@ export const useWorkspaceSelection = ({
);
const inspectFolder = useCallback(
(folderId?: string | number) => {
(folderId?: string) => {
if (!folderId) return;
onInspectFolder(folderId);
},