fix: use shared AsyncDataOptions

Co-authored-by: Tom Lienard <tom.lienrd@gmail.com>
This commit is contained in:
Daniel Roe 2023-07-25 09:49:35 +01:00
parent eccd10645f
commit 6abab412ad

View File

@ -14,7 +14,7 @@ import type { RenderResponse } from 'nitropack'
import type { NuxtIslandContext } from '../core/runtime/nitro/renderer' import type { NuxtIslandContext } from '../core/runtime/nitro/renderer'
import type { RouteMiddleware } from '../../app' import type { RouteMiddleware } from '../../app'
import type { NuxtError } from '../app/composables/error' import type { NuxtError } from '../app/composables/error'
import type { AsyncDataRequestStatus } from '../app/composables/asyncData' import type { AsyncDataOptions, AsyncDataRequestStatus } from '../app/composables/asyncData'
const nuxtAppCtx = /* #__PURE__ */ getContext<NuxtApp>('nuxt-app') const nuxtAppCtx = /* #__PURE__ */ getContext<NuxtApp>('nuxt-app')
@ -103,7 +103,7 @@ interface _NuxtApp {
[key: string]: unknown [key: string]: unknown
/** @internal */ /** @internal */
_asyncDataPromises: Record<string, Promise<any> & { strategy?: 'lazy' | 'blocking' | 'parallel' } | undefined> _asyncDataPromises: Record<string, Promise<any> & { strategy?: AsyncDataOptions<any>['strategy'] } | undefined>
/** @internal */ /** @internal */
_asyncData: Record<string, { _asyncData: Record<string, {
data: Ref<any> data: Ref<any>