Skip to content

Commit

Permalink
types: improve context types
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Mar 8, 2024
1 parent 63b6f55 commit f33599e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import type { PlatformProxy } from "wrangler";

declare module "h3" {
interface H3EventContext {
cf: PlatformProxy["cf"];
cloudflare: {
env: {
[key: string]: unknown;
};
request: Request & { cf: PlatformProxy["cf"] };
env: PlatformProxy["env"];
context: PlatformProxy["ctx"];
};
}
}
Expand Down

0 comments on commit f33599e

Please sign in to comment.