Deno KV Type narrowing issue
I'm setting up a discord bot for my application, so I can run bot automations when doing actions in the app. Some organizations will have bots, others won't, so it's critical that the session ID in deno kv oauth is
string | undefined
so I can guard correctly, right?
I've investigated the deno kv and deno kv oauth 2 source code and I'm seeing explicit types that don't align with the actual return types. I'm not sure if I'm just missing some critical info or if this is a TypeScript LSP bug, or what's going on... Can someone clue me in?
I might just be totally off-base and doing things totally wrong here.

1 Reply
Have you tried asking this at the kv-oauth repository? I think you might get a better answer there
I just had a look at the repo and I'm not sure if this project is still being maintained