/// import { Middleware } from "./middlewareTypes"; export declare type CloudflareEventFunctions = Pick & Partial>; /** * The main Sunder app class, this is the root of your Sunder-powered application. */ export declare class Sunder> { state?: DurableObjectState; silent: boolean; private middleware; constructor(opts?: { state?: DurableObjectState; }); /** * Handles given FetchEvent and returns a promise of the response. Note that this function catches errors and delegates them to the `this.onerror` function. * * An optional second argument with the environment can be supplied. */ handle(event: CloudflareEventFunctions & { request: Request; }, env?: EnvironmentType): Promise; fetch(request: Request, env: EnvironmentType, ctx: FetchEvent | CloudflareEventFunctions): Promise; /** * Registers a middleware function, note that the order matters! * @param fn */ use

(fn: Middleware): this; onerror(err: Error): void; }