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:
@@ -47,13 +47,22 @@ interface BankData {
|
||||
correspondentAccount: string
|
||||
}
|
||||
|
||||
interface BankSuggestion {
|
||||
value: string
|
||||
data: {
|
||||
bic: string
|
||||
correspondent_account?: string
|
||||
address?: { value: string }
|
||||
}
|
||||
}
|
||||
|
||||
interface Props {
|
||||
modelValue?: BankData
|
||||
}
|
||||
|
||||
interface Emits {
|
||||
(e: 'update:modelValue', value: BankData): void
|
||||
(e: 'select', bank: any): void
|
||||
(e: 'select', bank: BankSuggestion): void
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
@@ -66,15 +75,6 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
|
||||
const emit = defineEmits<Emits>()
|
||||
|
||||
interface BankSuggestion {
|
||||
value: string
|
||||
data: {
|
||||
bic: string
|
||||
correspondent_account?: string
|
||||
address?: { value: string }
|
||||
}
|
||||
}
|
||||
|
||||
const query = ref('')
|
||||
const suggestions = ref<BankSuggestion[]>([])
|
||||
const loading = ref(false)
|
||||
@@ -123,7 +123,7 @@ const onInput = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const selectBank = (bank: any) => {
|
||||
const selectBank = (bank: BankSuggestion) => {
|
||||
query.value = bank.value
|
||||
showDropdown.value = false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user