You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(api): authMiddleware context is untyped, so c.get() is never and test:deno:types cannot pass #477
So c.get("supabase") infers as never, and every property access on it is a type error. deno check on a single route file reports 14 errors purely from this:
TS2339 [ERROR]: Property 'schema' does not exist on type 'never'.
TS2339 [ERROR]: Property 'id' does not exist on type 'never'.
This is repo-wide across functions/api/routes/, not specific to one file, which means pnpm test:deno:types cannot pass and provides no signal today. In #443 I had to route around it with a local reader helper to avoid adding more of the same errors — that is a workaround, not a fix.
Fix
Declare the middleware's context shape once and use it everywhere:
exporttypeApiEnv={Variables: {supabase: SupabaseClientuser?: {id: string;email?: string}organization?: {id: string}}}// in each route fileconstapp=newOpenAPIHono<ApiEnv>()
Then c.get("supabase") is typed, the never errors disappear, and test:deno:types becomes a real gate. Mechanical but touches every route file, so it wants its own PR.
Activity
feat(office): connect the ATS — employer read path, status mapping, a…
fix(api): type the middleware context, so 2,056 of the API's 2,467 ty…