UNPKG

bunny-hono

Version:

Hono adapter for Edge Scripting for bunny.net 🐰

24 lines (21 loc) 975 B
import { Context, Env, Hono, Schema } from 'hono'; import { BlankEnv, BlankSchema } from 'hono/types'; declare const envObject: Record<string, string | undefined>; type Listener = { port: number; hostname: string; }; type PullZoneHandlerOptions = { url: string; }; export declare function standaloneHandler<E extends Env = BlankEnv, S extends Schema = BlankSchema, BasePath extends string = "/">(app: Hono<E, S, BasePath>, serveOptions?: Listener): void; export declare function middlewareHandler<E extends Env = BlankEnv, S extends Schema = BlankSchema, BasePath extends string = "/">(app: Hono<E, S, BasePath>, serveOptions?: Listener, pullZoneHandlerOptions?: PullZoneHandlerOptions): void; export type BunnyBindings = Partial<{ request: Request; response: Response; }> & typeof envObject; export interface BunnyEnv extends Env { Bindings: BunnyBindings; } export declare function env<E extends Env = any>(c: Context<E>): BunnyBindings & E["Bindings"]; export {};