global.d.ts 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // Vue 3 Composition API globals
  2. declare global {
  3. // Vue composition API
  4. const ref: (typeof import('vue'))['ref']
  5. const reactive: (typeof import('vue'))['reactive']
  6. const computed: (typeof import('vue'))['computed']
  7. const watch: (typeof import('vue'))['watch']
  8. const watchEffect: (typeof import('vue'))['watchEffect']
  9. const onMounted: (typeof import('vue'))['onMounted']
  10. const onUnmounted: (typeof import('vue'))['onUnmounted']
  11. const onBeforeUnmount: (typeof import('vue'))['onBeforeUnmount']
  12. const onBeforeMount: (typeof import('vue'))['onBeforeMount']
  13. const onUpdated: (typeof import('vue'))['onUpdated']
  14. const onBeforeUpdate: (typeof import('vue'))['onBeforeUpdate']
  15. const nextTick: (typeof import('vue'))['nextTick']
  16. const toRef: (typeof import('vue'))['toRef']
  17. const toRefs: (typeof import('vue'))['toRefs']
  18. // Vue router types
  19. type Route = import('vue-router')['RouteLocationNormalized']
  20. const onBeforeRouteLeave: (typeof import('vue-router'))['onBeforeRouteLeave']
  21. // Nuxt composables
  22. const useRouter: (typeof import('#app/composables/router'))['useRouter']
  23. const useRoute: (typeof import('#app/composables/router'))['useRoute']
  24. const navigateTo: (typeof import('#app/composables/router'))['navigateTo']
  25. const useRuntimeConfig: (typeof import('#app/composables/runtime-config'))['useRuntimeConfig']
  26. const useCookie: (typeof import('#app/composables/cookie'))['useCookie']
  27. const useState: (typeof import('#app/composables/state'))['useState']
  28. const useHead: (typeof import('#app/composables/head'))['useHead']
  29. const useSeoMeta: (typeof import('#app/composables/head'))['useSeoMeta']
  30. const useNuxtData: (typeof import('#app/composables/asyncData'))['useNuxtData']
  31. const clearNuxtData: (typeof import('#app/composables/asyncData'))['clearNuxtData']
  32. const refreshNuxtData: (typeof import('#app/composables/asyncData'))['refreshNuxtData']
  33. const useFetch: (typeof import('#app/composables/fetch'))['useFetch']
  34. const $fetch: (typeof import('#app/composables/fetch'))['$fetch']
  35. const useAsyncData: (typeof import('#app/composables/asyncData'))['useAsyncData']
  36. const useLazyFetch: (typeof import('#app/composables/fetch'))['useLazyFetch']
  37. const useLazyAsyncData: (typeof import('#app/composables/asyncData'))['useLazyAsyncData']
  38. const useNuxtApp: (typeof import('#app/composables/app'))['useNuxtApp']
  39. // Vue i18n
  40. const useI18n: (typeof import('#i18n'))['useI18n']
  41. // Pinia
  42. const useRepo: (typeof import('@pinia-orm/pinia'))['useRepo']
  43. // Custom store composables (assuming they exist)
  44. const usePageStore: () => unknown
  45. const useOrganizationProfileStore: () => unknown
  46. // Test framework globals (Vitest)
  47. const describe: (typeof import('vitest'))['describe']
  48. const it: (typeof import('vitest'))['it']
  49. const test: (typeof import('vitest'))['test']
  50. const expect: (typeof import('vitest'))['expect']
  51. const beforeEach: (typeof import('vitest'))['beforeEach']
  52. const beforeAll: (typeof import('vitest'))['beforeAll']
  53. const afterEach: (typeof import('vitest'))['afterEach']
  54. const afterAll: (typeof import('vitest'))['afterAll']
  55. const vi: (typeof import('vitest'))['vi']
  56. }
  57. export {}