Skip to content
File

Blob: src/worker/hono.ts

typescript20 lines
1import type { Context } from "hono";
2 
3import type { SessionRecord } from "@/worker/auth/sessions";
4import type { D1Db } from "@/worker/db/d1";
5import type { UserRow } from "@/worker/db/d1/repositories";
6 
7export interface AppVariables {
8 db: D1Db;
9 session: SessionRecord;
10 sessionId: string;
11 user: UserRow;
12}
13 
14export type AppEnv = {
15 Bindings: Env;
16 Variables: AppVariables;
17};
18 
19export type AppContext = Context<AppEnv>;