Skip to content

Commit 5c65251

Browse files
committed
chore: build errors
1 parent 377d80c commit 5c65251

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/runtime/nitro/og-image/cache.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
import type { Storage } from 'unstorage'
12
import { createStorage } from 'unstorage'
23
import lruCacheDriver from 'unstorage/drivers/lru-cache'
34
import type { OgImageOptions } from '../../types'
45

5-
export const htmlPayloadCache = createStorage<{ expiresAt: number, value: OgImageOptions }>({
6+
export const htmlPayloadCache: Storage<{ expiresAt: number, value: OgImageOptions }> = createStorage<{ expiresAt: number, value: OgImageOptions }>({
67
// short cache time so we don't need many entries at runtime
78
driver: lruCacheDriver({ max: import.meta.prerender ? 1000 : 50 }),
89
})
910

10-
export const prerenderOptionsCache = import.meta.prerender
11+
export const prerenderOptionsCache: Storage<OgImageOptions> | undefined = import.meta.prerender
1112
? createStorage<OgImageOptions>({
1213
driver: lruCacheDriver({ max: 1000 }),
1314
})

src/runtime/nitro/og-image/satori/transforms/emojis.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import type { NuxtIslandResponse } from 'nuxt/dist/core/runtime/nitro/renderer'
22
import defaultCharMap from '@iconify-json/noto/chars.json'
3+
import type { Storage } from 'unstorage'
34
import { createStorage } from 'unstorage'
45
import lruCacheDriver from 'unstorage/drivers/lru-cache'
56
import type { OgImageRenderEventContext } from '../../../../types'
67

7-
export const emojiCache = createStorage<string>({
8+
export const emojiCache: Storage<string> = createStorage<string>({
89
driver: lruCacheDriver({ max: 1000 }),
910
})
1011

0 commit comments

Comments
 (0)