26 lines
602 B
TypeScript
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>
|
|
}
|