15 lines
563 B
TypeScript
15 lines
563 B
TypeScript
// Test-only Hono ContextVariableMap shim — adds the slots normally
|
|
// contributed by sibling plugins (`@suaveplan/api-plugin-auth`,
|
|
// `@suaveplan/api-tenant`, `@suaveplan/api`) so test files can call
|
|
// `c.set("user", ...)`, `c.set("tenant", ...)`, `c.set("requestId", ...)`
|
|
// without ts2769 errors when the sibling packages are not direct deps.
|
|
import "hono";
|
|
|
|
declare module "hono" {
|
|
interface ContextVariableMap {
|
|
user: { id?: string } | null | undefined;
|
|
tenant: { id?: string } | null | undefined;
|
|
requestId: string;
|
|
}
|
|
}
|