xcx-operateui/types/global.d.ts
2025-10-19 08:59:09 +08:00

26 lines
602 B
TypeScript

import type { ComponentPublicInstance, FunctionalComponent } from 'vue'
import totalApiConfig from '@/api'
declare global {
type api = typeof totalApiConfig
type Recordable<T = any> = Record<string, T>
interface Array {
post?: <T>(data?: Recordable<any>) => Promise<{
code: string
msg: string
data: T
}>
get?: <T>(data?: Recordable<any>) => Promise<{
code: string
msg: string
data: T
}>
}
}
declare module 'vue' {
export type JSXComponent<Props = any> =
| { new (): ComponentPublicInstance<Props> }
| FunctionalComponent<Props>
}