fix: eliminate all TypeScript any usage across Vue components

Replace 24 `err: any` error handler types with proper `AxiosError<ApiErrorResponse>`
typing. Fix additional `as any` casts and `Record<string, any>` patterns in registration
field components, event settings, and portal layout. Create shared `ApiErrorResponse`
type for portal app.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-15 21:54:01 +02:00
parent 0be2956ea4
commit cd2c775692
29 changed files with 151 additions and 80 deletions

View File

@@ -4,6 +4,8 @@ import { useUpdateSection, useSectionCategories } from '@/composables/api/useSec
import { useAuthStore } from '@/stores/useAuthStore'
import { requiredValidator } from '@core/utils/validators'
import type { FestivalSection, SectionType } from '@/types/section'
import type { AxiosError } from 'axios'
import type { ApiErrorResponse } from '@/types/auth'
const props = defineProps<{
eventId: string
@@ -91,8 +93,8 @@ function onSubmit() {
modelValue.value = false
emit('updated')
},
onError: (err: any) => {
const data = err.response?.data
onError: (err: Error) => {
const data = (err as AxiosError<ApiErrorResponse>).response?.data
if (data?.errors) {
errors.value = Object.fromEntries(
Object.entries(data.errors).map(([k, v]) => [k, (v as string[])[0]]),