import type { UseFetchOptions } from 'nuxt/app' export function useApi( url: string | (() => string), options?: UseFetchOptions, ) { return useFetch(url, { ...options, $fetch: useNuxtApp().$api as typeof $fetch }) }