You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Argument of type 'QuickLRU<string, string>' is not assignable to parameter of type 'Map<string, string>'.
Type 'QuickLRU<string, string>' is missing the following properties from type 'Map<string, string>':
forEach, entries, [Symbol.toStringTag]
ts(2345)
The text was updated successfully, but these errors were encountered:
Maybe you could instead export the cache as a new Map object. In doing so, you preserve the cache and the exported map behaves as expected.
If you just cast the cache to Map, then your resulting map is of type Map<string, string | undefined> not Map<string, string> because a value might be stalled and therefore map.get(key) would return undefined, not the expected value.
If you provide a method .toMap(), you can already filter the stalled values from the Map.
javi11
pushed a commit
to javi11/quick-lru-cjs
that referenced
this issue
Nov 19, 2021
Currently it throws this:
The text was updated successfully, but these errors were encountered: