From bb28819d3c20aa7d16871ae36433c17dd282800c Mon Sep 17 00:00:00 2001 From: Haruaki OTAKE Date: Mon, 22 May 2023 16:25:50 +0900 Subject: [PATCH] fix(nuxt): fix useLazyFetch types (#20989) --- packages/nuxt/src/app/composables/fetch.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/nuxt/src/app/composables/fetch.ts b/packages/nuxt/src/app/composables/fetch.ts index ba77fe8c24..d838346d2c 100644 --- a/packages/nuxt/src/app/composables/fetch.ts +++ b/packages/nuxt/src/app/composables/fetch.ts @@ -134,7 +134,7 @@ export function useLazyFetch< DefaultT = null, > ( request: Ref | ReqT | (() => ReqT), - opts?: Omit, 'lazy'> + opts?: Omit, 'lazy'> ): AsyncData | DefaultT, ErrorT | null> export function useLazyFetch< ResT = void, @@ -147,12 +147,12 @@ export function useLazyFetch< DefaultT = null, > ( request: Ref | ReqT | (() => ReqT), - arg1?: string | Omit, 'lazy'>, + arg1?: string | Omit, 'lazy'>, arg2?: string ) { const [opts, autoKey] = typeof arg1 === 'string' ? [{}, arg1] : [arg1, arg2] - return useFetch(request, { + return useFetch(request, { ...opts, lazy: true },