import type { Future, Handler, NextFn } from "@warp-drive/core/request"; import type { RequestContext, StructuredDataDocument } from "@warp-drive/core/types/request"; /** * If CheckFn returns true, the wrapped handler will be used. * If CheckFn returns false, the wrapped handler will be skipped. */ type CheckFn = (context: RequestContext) => boolean; /** * * @group Handlers * @public */ export declare class Gate implements Handler { handler: Handler; checkFn: CheckFn; constructor(handler: Handler, checkFn: CheckFn); request(context: RequestContext, next: NextFn): Promise> | Future; } export {};