export {}

declare global {
  type DeepPartial<T> = T extends Function
    ? T
    : T extends Array<infer U>
      ? Array<DeepPartial<U>>
      : T extends object
        ? { [K in keyof T]?: DeepPartial<T[K]> }
        : T;
  namespace G {
    interface TreeNode {
      id: string
      pid: string
      children?: TreeNode[]
      hasChildren?: boolean

      [key: string]: any
    }

    interface PageResult<T = object> {
      current: number
      size: number
      pages: number
      total: number
      records: T[]
    }

    interface PageParam extends Record<string, any> {
      current?: number
      size?: number
      orders?: string
    }

    interface Pagination {
      total?: number
      pages?: number
      current?: number
      size?: number
    }
  }
}

