File tree 2 files changed +5
-3
lines changed
src/runtime/nitro/og-image
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change
1
+ import type { Storage } from 'unstorage'
1
2
import { createStorage } from 'unstorage'
2
3
import lruCacheDriver from 'unstorage/drivers/lru-cache'
3
4
import type { OgImageOptions } from '../../types'
4
5
5
- export const htmlPayloadCache = createStorage < { expiresAt : number , value : OgImageOptions } > ( {
6
+ export const htmlPayloadCache : Storage < { expiresAt : number , value : OgImageOptions } > = createStorage < { expiresAt : number , value : OgImageOptions } > ( {
6
7
// short cache time so we don't need many entries at runtime
7
8
driver : lruCacheDriver ( { max : import . meta. prerender ? 1000 : 50 } ) ,
8
9
} )
9
10
10
- export const prerenderOptionsCache = import . meta. prerender
11
+ export const prerenderOptionsCache : Storage < OgImageOptions > | undefined = import . meta. prerender
11
12
? createStorage < OgImageOptions > ( {
12
13
driver : lruCacheDriver ( { max : 1000 } ) ,
13
14
} )
Original file line number Diff line number Diff line change 1
1
import type { NuxtIslandResponse } from 'nuxt/dist/core/runtime/nitro/renderer'
2
2
import defaultCharMap from '@iconify-json/noto/chars.json'
3
+ import type { Storage } from 'unstorage'
3
4
import { createStorage } from 'unstorage'
4
5
import lruCacheDriver from 'unstorage/drivers/lru-cache'
5
6
import type { OgImageRenderEventContext } from '../../../../types'
6
7
7
- export const emojiCache = createStorage < string > ( {
8
+ export const emojiCache : Storage < string > = createStorage < string > ( {
8
9
driver : lruCacheDriver ( { max : 1000 } ) ,
9
10
} )
10
11
You can’t perform that action at this time.
0 commit comments