refactor: remove all any types, add strict GraphQL scalar typing
All checks were successful
Build Docker Image / build (push) Successful in 4m3s
All checks were successful
Build Docker Image / build (push) Successful in 4m3s
- Add strictScalars: true to codegen.ts with proper scalar mappings (Date, Decimal, JSONString, JSON, UUID, BigInt → string/Record) - Replace all ref<any[]> with proper GraphQL-derived types - Add type guards for null filtering in arrays - Fix bugs exposed by typing (locationLatitude vs latitude, etc.) - Add interfaces for external components (MapboxSearchBox) This enables end-to-end type safety from GraphQL schema to frontend.
This commit is contained in:
@@ -86,7 +86,6 @@ interface Offer {
|
||||
status?: string | null
|
||||
latitude?: number | null
|
||||
longitude?: number | null
|
||||
lines?: any[] | null
|
||||
}
|
||||
|
||||
interface Supplier {
|
||||
|
||||
@@ -61,11 +61,10 @@
|
||||
<script setup lang="ts">
|
||||
interface SelectedItem {
|
||||
uuid: string
|
||||
name?: string
|
||||
country?: string
|
||||
name?: string | null
|
||||
country?: string | null
|
||||
latitude?: number | null
|
||||
longitude?: number | null
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
defineProps<{
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
<script setup lang="ts">
|
||||
interface Offer {
|
||||
uuid: string
|
||||
[key: string]: any
|
||||
name?: string | null
|
||||
productUuid?: string | null
|
||||
}
|
||||
|
||||
defineProps<{
|
||||
|
||||
@@ -96,7 +96,7 @@ import type { SelectMode } from '~/composables/useCatalogSearch'
|
||||
interface Item {
|
||||
uuid?: string | null
|
||||
name?: string | null
|
||||
[key: string]: any
|
||||
country?: string | null
|
||||
}
|
||||
|
||||
const props = defineProps<{
|
||||
|
||||
Reference in New Issue
Block a user