refactor: extend type definitions for vue-router and axios with additional metadata

This commit is contained in:
skytek_xinliang
2026-03-27 16:13:52 +08:00
parent 24661a17b3
commit 1201ef10d5
Vendored
+28 -1
View File
@@ -1,2 +1,29 @@
/// <reference types="vite/client" /> /// <reference types="vite/client" />
/// <reference types="vite-plugin-vue-layouts-next/client" />
import 'axios'
import 'vue-router'
declare module 'vue-router' {
interface RouteMeta {
layout?: 'default' | 'none'
title?: string
requiresAuth?: boolean
guestOnly?: boolean
roles?: string[]
}
}
declare module 'axios' {
interface AxiosRequestConfig {
meta?: {
silentToast?: boolean
}
}
interface InternalAxiosRequestConfig {
meta?: {
silentToast?: boolean
}
}
}