Extend locals and have it typed rather than unknown
#1269
Unanswered
CallumVass
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using Pocketbase with solid-start and am wondering how I can have my pocketbase instance on
locals
typed? Aslocals
is just aRecord<string, unknown>
but I know the key withpb
will be of typeTypedPocketBase
At the moment I have to do this everywhere:
Where as I'd like to just do this:
For context, I am adding it to my
locals
in middleware:Is that possible?
Beta Was this translation helpful? Give feedback.
All reactions