import type { ComponentPublicInstance, FunctionalComponent } from 'vue'
import totalApiConfig from '@/api'

declare global {
  type api = typeof totalApiConfig
  type abc = 123
  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>
}
