refactor: extend type definitions for vue-router and axios with additional metadata
This commit is contained in:
@@ -1,2 +1,29 @@
|
||||
/// <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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user