mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-21 16:09:52 +00:00
chore: types
This commit is contained in:
parent
d62ca46457
commit
a49cad2362
@ -322,6 +322,7 @@ export function useAsyncData<
|
||||
// Setup hook callbacks once per instance
|
||||
const instance = getCurrentInstance()
|
||||
if (import.meta.dev && !nuxt.isHydrating && (!instance || instance?.isMounted)) {
|
||||
// @ts-expect-error private property
|
||||
console.warn(`[nuxt] [${options._useFetch ? 'useFetch' : 'useAsyncData'}] Component is already mounted, please use $fetch instead. See https://nuxt.com/docs/getting-started/data-fetching`)
|
||||
}
|
||||
if (instance && !instance._nuxtOnBeforeMountCbs) {
|
||||
|
@ -144,7 +144,7 @@ export function useFetch<
|
||||
getCachedData,
|
||||
deep,
|
||||
watch: watch === false ? [] : [_fetchOptions, _request, ...(watch || [])],
|
||||
// @ts-expect-error private method
|
||||
// @ts-expect-error private property
|
||||
_useFetch: true
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user