Argument type string is not assignable to parameter type keyof E["Variables"]
I'm using Hono with Webstorm and whenever I use .get() or .set() with some key of string, webstorm will always complain such type mismatch. Even the type-safe guard on docs doesn't help.
The code:
https://github.com/search?q=repo%3Aminhperry%2Fcf-worker-backend%20c.get(&type=code
7 Replies
It still does work, just that webstorm is complaining. Maybe is this its problem instead of Hono's?
make your context type like this
still complains idk
Seems to be working on VSCode -
my final solution, just
context.get('user' as any)
Can you show the code snippet?