From a748884fafbc4acc49d02f0f6ac5c717db37970f Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Fri, 28 Nov 2025 18:05:33 -0800 Subject: [PATCH] fix: consolidate SearchResult type definition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove duplicate generic SearchResult from types.ts - Export SearchResult from search.adapter.ts via index.ts - Eliminates type conflict between two incompatible SearchResult definitions This fixes "Type 'SearchResult' is not assignable to type 'SearchResult'" errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/lib/api/adapters/index.ts | 1 + src/lib/api/adapters/types.ts | 38 ----------------------------------- 2 files changed, 1 insertion(+), 38 deletions(-) diff --git a/src/lib/api/adapters/index.ts b/src/lib/api/adapters/index.ts index 7e93d4c2..0085e070 100644 --- a/src/lib/api/adapters/index.ts +++ b/src/lib/api/adapters/index.ts @@ -6,6 +6,7 @@ export { GridAdapter, gridAdapter } from './grid.adapter' export { JobAdapter, jobAdapter } from './job.adapter' export { PartyAdapter, partyAdapter } from './party.adapter' export { SearchAdapter, searchAdapter } from './search.adapter' +export type { SearchResult, SearchParams, SearchResponse } from './search.adapter' export { UserAdapter, userAdapter } from './user.adapter' export { DEFAULT_ADAPTER_CONFIG } from './config' export * from './types' diff --git a/src/lib/api/adapters/types.ts b/src/lib/api/adapters/types.ts index 33854ca3..e5d76eae 100644 --- a/src/lib/api/adapters/types.ts +++ b/src/lib/api/adapters/types.ts @@ -212,44 +212,6 @@ export interface SearchParams { signal?: AbortSignal | undefined } -/** - * Unified search result structure - */ -export interface SearchResult { - /** Unique identifier */ - id: string - - /** Granblue Fantasy game ID */ - granblueId: string - - /** Item name (localized or string) */ - name: { en?: string; ja?: string } | string - - /** Display name (computed from name) */ - displayName?: string - - /** Element ID (0-6) */ - element?: number - - /** Rarity level */ - rarity?: number - - /** Primary proficiency (weapons) */ - proficiency?: number - - /** Series ID */ - series?: number - - /** URL to the item's image */ - imageUrl?: string - - /** Type of the search result */ - type: 'weapon' | 'character' | 'summon' - - /** The full entity data */ - data?: T -} - /** * Cache entry structure */