From 9c1dfb304ff4d8f50e4c8b05897b55fa3a9cc07a Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Sat, 23 Dec 2023 23:00:20 +0900 Subject: [PATCH] (fix) types --- composables/useGAsyncData.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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