diff --git a/composables/useGAsyncData.ts b/composables/useGAsyncData.ts index dd97a2f4..261d46f4 100644 --- a/composables/useGAsyncData.ts +++ b/composables/useGAsyncData.ts @@ -1,8 +1,10 @@ -export function useGAsyncData(...params: Parameters) { +type KeysOf = Array; + +export function useGAsyncData = KeysOf, DefaultT = null>(...params: Parameters>): ReturnType> { if (!params[2]) { params[2] = {}; } params[2].getCachedData = (key) => useNuxtData(key).data.value ?? null; - return useAsyncData(...params); + return useAsyncData(...params); } \ No newline at end of file