Strange error
Hi,
I'm trying to create something with HonoJS, CloudFlare Workers and D1 (with Prisma).
I just want to temporarily lock the user, only I run into this strange problem.
Code:
Error that vsc shows:
Property 'user' does not exist on type 'Context<{ Bindings: Bindings; }, never, {}>'.ts(2339)
Thanks for any help!2 Replies
You may want to use something like
<{ Bindings: …, Variables: { user: { id: number }}>
Then
c.set('user', { id: 1 })
Then whenever you want to get it
c.get('user')
Lmk if there’s anything wrong, syntax may be wrong since I’m on phone
Okay thanks!