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:
@@ -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] ?? '',
|
||||
|
||||
Reference in New Issue
Block a user