Hi,
I'm on version ^9.1.1
I try to use the fetch()function with Typescript. However, the return type is void | V. I expect it to return only the Value type only. The void type will break some of my TS.
Version 7.18return the value only without void
const cache = new LRUCache<string, string> ({
max: 10,
ttl: 1000 * 60 * 10, // 10 minutes
allowStale: true,
noDeleteOnFetchRejection: true,
fetchMethod: async (cacheKey) => {
return "some string"
}))
// I expect it returns string but it returns void | string. Why so?
const data = await cache.fetch("somekey")
Hi,
I'm on version
^9.1.1I try to use the
fetch()function with Typescript. However, the return type isvoid | V. I expect it to return only the Value type only. Thevoidtype will break some of my TS.Version
7.18return the value only without void