Why TypeScript definition for cache object is not complete? #2213
Unanswered
ansavchenco
asked this question in
Q&A
Replies: 1 comment
-
SWR uses |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Current TypeScript definition for cache object is the following:
The default cache object (when no provided specified) is however a regular js map with all the map methods on it. I sometimes need to use regular map methods like
keys()
and getting TypeScript complaining that there is no such method (even though there is) is very annoying.So, is there a particular reason why
Cache
is typed this way and not as a regular map?Beta Was this translation helpful? Give feedback.
All reactions