From aa87ccb7d7357986192ba46261b03273b609b53e Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Fri, 28 Nov 2025 19:52:02 -0800 Subject: [PATCH] fix: Phase 6 - fix ImageVariant type export (37 -> 36 errors) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed TypeScript error where ImageVariant type wasn't accessible in the same file that re-exported it. The issue: Re-exporting a type with `export type { X } from 'module'` doesn't create a local binding that can be used in the same file. The fix: Import the type first to create a local binding, then re-export it. Changes: - src/lib/features/database/detail/image.ts: - Added: import type { ResourceType, ImageVariant } from '$lib/utils/images' - Kept: export type { ResourceType as ResourceKind, ImageVariant } - This allows ImageVariant to be used in the ImageArgs interface below Result: 37 → 36 errors (-1) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/lib/features/database/detail/image.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/features/database/detail/image.ts b/src/lib/features/database/detail/image.ts index 8c369502..2d443758 100644 --- a/src/lib/features/database/detail/image.ts +++ b/src/lib/features/database/detail/image.ts @@ -7,7 +7,9 @@ export { getImageUrl as getImageUrlBase } from '$lib/utils/images' -export type { ResourceType as ResourceKind, ImageVariant } from '$lib/utils/images' +// Import types for local use and re-export +import type { ResourceType, ImageVariant } from '$lib/utils/images' +export type { ResourceType as ResourceKind, ImageVariant } // Legacy compatibility wrapper interface ImageArgs {