Open bkerin opened 2 months ago
Don't worry, TypeScript is very confusing to me too :sweat_smile: I'm figuring it out as I go.
When you created your app, did you include the extra TypeScript generics?
const app = new Hono<{
Variables: {
session: Session,
session_key_rotation: boolean
}
}>()
The error appears if you use
import { Hono } from 'jsr:@hono/hono'
instead of
import { Hono } from 'npm:hono'
The home page said it might happen and shows how to ts-ignore, but I'd sort of like to know what it means and maybe how to fix it. For me without the ts-ignore deno says:
I'm pretty new to typescript and have to admit I find this pretty hard to decipher especially the mismatch between type 'Context' ... with type 'Context' bit. Any clues?