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
+3 -3
View File
@@ -4,10 +4,10 @@ import { PlusIcon } from './icons';
import useFloatingMenu from './useFloatingMenu';
type QuickAddOption = string | number | { id?: string | number; label?: string; name?: string;[key: string]: unknown };
type QuickAddOption = string | { id?: string; label?: string; name?: string;[key: string]: unknown };
interface NormalizedOption {
id?: string | number;
id?: string;
label: string;
original: QuickAddOption;
index: number;
@@ -47,7 +47,7 @@ interface FloatingMenuState {
updatePosition: () => void;
}
type CSSVarStyle = CSSProperties & Record<string, string | number>;
type CSSVarStyle = CSSProperties & Record<string, string>;
export interface QuickAddMenuProps {
onSelectOption?: (value: QuickAddOption, normalized: NormalizedOption) => Promise<void> | void;