refactor: remove any types and fix TypeScript errors
All checks were successful
Build Docker Image / build (push) Successful in 3m59s
All checks were successful
Build Docker Image / build (push) Successful in 3m59s
- Export InfoProductItem, InfoHubItem, InfoSupplierItem, InfoOfferItem types - Update InfoEntity interface to have explicit fields (no index signature) - Export CatalogHubItem, CatalogNearestHubItem from useCatalogHubs - Fix MapItem interfaces to accept nullable GraphQL types - Fix v-for :key bindings to handle null uuid - Add null guards in select-location pages - Update HubCard to accept nullable transportTypes - Add shims.d.ts for missing module declarations
This commit is contained in:
@@ -3,9 +3,13 @@ import { HubsListDocument, GetHubCountriesDocument, NearestHubsDocument } from '
|
||||
|
||||
const PAGE_SIZE = 24
|
||||
|
||||
// Type from codegen
|
||||
type HubItem = NonNullable<NonNullable<HubsListQueryResult['hubsList']>[number]>
|
||||
type NearestHubItem = NonNullable<NonNullable<NearestHubsQueryResult['nearestHubs']>[number]>
|
||||
// Type from codegen - exported for use in pages
|
||||
export type CatalogHubItem = NonNullable<NonNullable<HubsListQueryResult['hubsList']>[number]>
|
||||
export type CatalogNearestHubItem = NonNullable<NonNullable<NearestHubsQueryResult['nearestHubs']>[number]>
|
||||
|
||||
// Internal aliases
|
||||
type HubItem = CatalogHubItem
|
||||
type NearestHubItem = CatalogNearestHubItem
|
||||
|
||||
// Shared state across list and map views
|
||||
const items = ref<Array<HubItem | NearestHubItem>>([])
|
||||
|
||||
Reference in New Issue
Block a user