Skip to content

Commit a0d6298

Browse files
committed
fix: types
1 parent feb8ceb commit a0d6298

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

server/plugins/fetch-cache.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,12 @@ export default defineNitroPlugin(nitroApp => {
6060
function createCachedFetch(event: H3Event): CachedFetchFunction {
6161
return async <T = unknown>(
6262
url: string,
63-
options: {
64-
method?: string
65-
body?: unknown
66-
headers?: Record<string, string>
67-
} = {},
63+
options: Parameters<typeof $fetch>[1] = {},
6864
ttl: number = FETCH_CACHE_DEFAULT_TTL,
6965
): Promise<CachedFetchResult<T>> => {
7066
// Check if this URL should be cached
7167
if (!isAllowedDomain(url)) {
72-
const data = (await $fetch(url, options as Parameters<typeof $fetch>[1])) as T
68+
const data = (await $fetch(url, options)) as T
7369
return { data, isStale: false, cachedAt: null }
7470
}
7571

0 commit comments

Comments
 (0)