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

@@ -6,6 +6,8 @@ import { requiredValidator } from '@core/utils/validators'
import { VNodeRenderer } from '@layouts/components/VNodeRenderer'
import { themeConfig } from '@themeConfig'
import type { OrganisationRole } from '@/types/member'
import type { AxiosError } from 'axios'
import type { ApiErrorResponse } from '@/types/auth'
definePage({
meta: {
@@ -68,8 +70,8 @@ function onSubmit() {
authStore.setUser(response.data.user)
router.replace('/dashboard')
},
onError: (err: any) => {
const data = err.response?.data
onError: (err: Error) => {
const data = (err as AxiosError<ApiErrorResponse>).response?.data
if (data?.errors) {
errors.value = {
name: data.errors.name?.[0] ?? '',