From d87d9e32554eae5bd2d63988e76b26f47d4dbfe0 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sat, 2 May 2026 23:34:11 -0400 Subject: [PATCH] fix(web): widen TrackMenuItem icon prop type to match Lucide signature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previous fix narrowed `IconProp` to `ComponentType>` but Lucide icons accept `size: string | number` (you can write size="16" or size={16}), and the resulting structural mismatch surfaces 11 type errors at every assignment site. Drop the prop-shape constraint entirely — TrackMenuItem only ever passes numeric values to the icon. --- web/src/lib/components/TrackMenuItem.svelte | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/web/src/lib/components/TrackMenuItem.svelte b/web/src/lib/components/TrackMenuItem.svelte index 638fe2c2..5c68324d 100644 --- a/web/src/lib/components/TrackMenuItem.svelte +++ b/web/src/lib/components/TrackMenuItem.svelte @@ -3,10 +3,11 @@ // Lucide-svelte ships class-based components (typeof ListPlus = ComponentType<...>), // not runes-mode function components (Svelte 5's Component<...> type). Use - // ComponentType> so any Lucide icon assigns cleanly. - type IconProp = ComponentType< - SvelteComponent<{ size?: number; strokeWidth?: number; class?: string }> - >; + // ComponentType with no prop-shape constraint — Lucide + // accepts size/strokeWidth as `string | number` and a tighter constraint + // here trips structural assignment. We always pass numeric `size={14}` and + // `strokeWidth={1}` below so the runtime contract is consistent. + type IconProp = ComponentType; let { icon,