Initial Commit
This commit is contained in:
14
packages/api-stack/api/api-plugin-audit/tests/setup/hono-shim.d.ts
vendored
Normal file
14
packages/api-stack/api/api-plugin-audit/tests/setup/hono-shim.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user