UNPKG

@busy-hour/blaze

Version:

<h1 align='center'>🔥 Blaze</h1> <div align='center'> An event driven framework for 🔥 Hono.js </div>

22 lines (21 loc) • 1.56 kB
import type { Context as HonoCtx } from 'hono'; import type { BlazeContext } from '../internal/context/index'; import type { BlazeRouter } from '../router/BlazeRouter'; import type { Random } from '../types/common'; import type { Method, RestErrorHandlerOption, RestResponseHandlerOption, StatusCode } from '../types/rest'; export declare function getRouteHandler(router: BlazeRouter, method: Method | null): import("hono/types").HandlerInterface<import("hono").Env, "all", {}, "/"> | import("hono/types").MiddlewareHandlerInterface<import("hono").Env, {}, "/">; export declare function getRestResponse(options: Omit<RestResponseHandlerOption, 'honoCtx'>): readonly [ Random, StatusCode | undefined, Record<string, string | string[]> | undefined ]; export declare function handleRestError(options: RestErrorHandlerOption): Response & import("hono").TypedResponse<never, 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511, "json">; export declare function handleRestResponse(options: RestResponseHandlerOption): Response | Promise<Response>; export declare function handleRest<T>(options: { ctx: BlazeContext; honoCtx: HonoCtx; promise: Promise<T> | T; }): Promise<{ resp: Response; ok: boolean; }>;