//#region ../../node_modules/hono/dist/types/router.d.ts /** * Interface representing a router. * * @template T - The type of the handler. */ interface Router { /** * The name of the router. */ name: string; /** * Adds a route to the router. * * @param method - The HTTP method (e.g., 'get', 'post'). * @param path - The path for the route. * @param handler - The handler for the route. */ add(method: string, path: string, handler: T$1): void; /** * Matches a route based on the given method and path. * * @param method - The HTTP method (e.g., 'get', 'post'). * @param path - The path to match. * @returns The result of the match. */ match(method: string, path: string): Result; } /** * Type representing a map of parameter indices. */ type ParamIndexMap = Record; /** * Type representing a stash of parameters. */ type ParamStash = string[]; /** * Type representing a map of parameters. */ type Params = Record; /** * Type representing the result of a route match. * * The result can be in one of two formats: * 1. An array of handlers with their corresponding parameter index maps, followed by a parameter stash. * 2. An array of handlers with their corresponding parameter maps. * * Example: * * [[handler, paramIndexMap][], paramArray] * ```typescript * [ * [ * [middlewareA, {}], // '*' * [funcA, {'id': 0}], // '/user/:id/*' * [funcB, {'id': 0, 'action': 1}], // '/user/:id/:action' * ], * ['123', 'abc'] * ] * ``` * * [[handler, params][]] * ```typescript * [ * [ * [middlewareA, {}], // '*' * [funcA, {'id': '123'}], // '/user/:id/*' * [funcB, {'id': '123', 'action': 'abc'}], // '/user/:id/:action' * ] * ] * ``` */ type Result = [[T$1, ParamIndexMap][], ParamStash] | [[T$1, Params][]]; //#endregion //#region ../../node_modules/hono/dist/types/hono-base.d.ts type GetPath = (request: Request, options?: { env?: E$1["Bindings"]; }) => string; type HonoOptions = { /** * `strict` option specifies whether to distinguish whether the last path is a directory or not. * * @see {@link https://hono.dev/docs/api/hono#strict-mode} * * @default true */ strict?: boolean; /** * `router` option specifies which router to use. * * @see {@link https://hono.dev/docs/api/hono#router-option} * * @example * ```ts * const app = new Hono({ router: new RegExpRouter() }) * ``` */ router?: Router<[H, RouterRoute]>; /** * `getPath` can handle the host header value. * * @see {@link https://hono.dev/docs/api/routing#routing-with-host-header-value} * * @example * ```ts * const app = new Hono({ * getPath: (req) => * '/' + req.headers.get('host') + req.url.replace(/^https?:\/\/[^/]+(\/[^?]*)/, '$1'), * }) * * app.get('/www1.example.com/hello', () => c.text('hello www1')) * * // A following request will match the route: * // new Request('http://www1.example.com/hello', { * // headers: { host: 'www1.example.com' }, * // }) * ``` */ getPath?: GetPath; }; type MountOptionHandler = (c: Context) => unknown; type MountReplaceRequest = (originalRequest: Request) => Request; type MountOptions = MountOptionHandler | { optionHandler?: MountOptionHandler; replaceRequest?: MountReplaceRequest | false; }; declare class Hono { get: HandlerInterface; post: HandlerInterface; put: HandlerInterface; delete: HandlerInterface; options: HandlerInterface; patch: HandlerInterface; all: HandlerInterface; on: OnHandlerInterface; use: MiddlewareHandlerInterface; router: Router<[H, RouterRoute]>; readonly getPath: GetPath; routes: RouterRoute[]; constructor(options?: HonoOptions); /** * `.route()` allows grouping other Hono instance in routes. * * @see {@link https://hono.dev/docs/api/routing#grouping} * * @param {string} path - base Path * @param {Hono} app - other Hono instance * @returns {Hono} routed Hono instance * * @example * ```ts * const app = new Hono() * const app2 = new Hono() * * app2.get("/user", (c) => c.text("user")) * app.route("/api", app2) // GET /api/user * ``` */ route(path: SubPath, app: Hono): Hono> | S$1, BasePath>; /** * `.basePath()` allows base paths to be specified. * * @see {@link https://hono.dev/docs/api/routing#base-path} * * @param {string} path - base Path * @returns {Hono} changed Hono instance * * @example * ```ts * const api = new Hono().basePath('/api') * ``` */ basePath(path: SubPath): Hono>; /** * `.onError()` handles an error and returns a customized Response. * * @see {@link https://hono.dev/docs/api/hono#error-handling} * * @param {ErrorHandler} handler - request Handler for error * @returns {Hono} changed Hono instance * * @example * ```ts * app.onError((err, c) => { * console.error(`${err}`) * return c.text('Custom Error Message', 500) * }) * ``` */ onError: (handler: ErrorHandler) => Hono; /** * `.notFound()` allows you to customize a Not Found Response. * * @see {@link https://hono.dev/docs/api/hono#not-found} * * @param {NotFoundHandler} handler - request handler for not-found * @returns {Hono} changed Hono instance * * @example * ```ts * app.notFound((c) => { * return c.text('Custom 404 Message', 404) * }) * ``` */ notFound: (handler: NotFoundHandler) => Hono; /** * `.mount()` allows you to mount applications built with other frameworks into your Hono application. * * @see {@link https://hono.dev/docs/api/hono#mount} * * @param {string} path - base Path * @param {Function} applicationHandler - other Request Handler * @param {MountOptions} [options] - options of `.mount()` * @returns {Hono} mounted Hono instance * * @example * ```ts * import { Router as IttyRouter } from 'itty-router' * import { Hono } from 'hono' * // Create itty-router application * const ittyRouter = IttyRouter() * // GET /itty-router/hello * ittyRouter.get('/hello', () => new Response('Hello from itty-router')) * * const app = new Hono() * app.mount('/itty-router', ittyRouter.handle) * ``` * * @example * ```ts * const app = new Hono() * // Send the request to another application without modification. * app.mount('/app', anotherApp, { * replaceRequest: (req) => req, * }) * ``` */ mount(path: string, applicationHandler: (request: Request, ...args: any) => Response | Promise, options?: MountOptions): Hono; /** * `.fetch()` will be entry point of your app. * * @see {@link https://hono.dev/docs/api/hono#fetch} * * @param {Request} request - request Object of request * @param {Env} Env - env Object * @param {ExecutionContext} - context of execution * @returns {Response | Promise} response of request * */ fetch: (request: Request, Env?: E$1["Bindings"] | {}, executionCtx?: ExecutionContext) => Response | Promise; /** * `.request()` is a useful method for testing. * You can pass a URL or pathname to send a GET request. * app will return a Response object. * ```ts * test('GET /hello is ok', async () => { * const res = await app.request('/hello') * expect(res.status).toBe(200) * }) * ``` * @see https://hono.dev/docs/api/hono#request */ request: (input: RequestInfo | URL, requestInit?: RequestInit, Env?: E$1["Bindings"] | {}, executionCtx?: ExecutionContext) => Response | Promise; /** * `.fire()` automatically adds a global fetch event listener. * This can be useful for environments that adhere to the Service Worker API, such as non-ES module Cloudflare Workers. * @see https://hono.dev/docs/api/hono#fire * @see https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API * @see https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/ */ fire: () => void; } //#endregion //#region ../../node_modules/hono/dist/types/utils/headers.d.ts /** * @module * HTTP Headers utility. */ type RequestHeader = "A-IM" | "Accept" | "Accept-Additions" | "Accept-CH" | "Accept-Charset" | "Accept-Datetime" | "Accept-Encoding" | "Accept-Features" | "Accept-Language" | "Accept-Patch" | "Accept-Post" | "Accept-Ranges" | "Accept-Signature" | "Access-Control" | "Access-Control-Allow-Credentials" | "Access-Control-Allow-Headers" | "Access-Control-Allow-Methods" | "Access-Control-Allow-Origin" | "Access-Control-Expose-Headers" | "Access-Control-Max-Age" | "Access-Control-Request-Headers" | "Access-Control-Request-Method" | "Age" | "Allow" | "ALPN" | "Alt-Svc" | "Alt-Used" | "Alternates" | "AMP-Cache-Transform" | "Apply-To-Redirect-Ref" | "Authentication-Control" | "Authentication-Info" | "Authorization" | "Available-Dictionary" | "C-Ext" | "C-Man" | "C-Opt" | "C-PEP" | "C-PEP-Info" | "Cache-Control" | "Cache-Status" | "Cal-Managed-ID" | "CalDAV-Timezones" | "Capsule-Protocol" | "CDN-Cache-Control" | "CDN-Loop" | "Cert-Not-After" | "Cert-Not-Before" | "Clear-Site-Data" | "Client-Cert" | "Client-Cert-Chain" | "Close" | "CMCD-Object" | "CMCD-Request" | "CMCD-Session" | "CMCD-Status" | "CMSD-Dynamic" | "CMSD-Static" | "Concealed-Auth-Export" | "Configuration-Context" | "Connection" | "Content-Base" | "Content-Digest" | "Content-Disposition" | "Content-Encoding" | "Content-ID" | "Content-Language" | "Content-Length" | "Content-Location" | "Content-MD5" | "Content-Range" | "Content-Script-Type" | "Content-Security-Policy" | "Content-Security-Policy-Report-Only" | "Content-Style-Type" | "Content-Type" | "Content-Version" | "Cookie" | "Cookie2" | "Cross-Origin-Embedder-Policy" | "Cross-Origin-Embedder-Policy-Report-Only" | "Cross-Origin-Opener-Policy" | "Cross-Origin-Opener-Policy-Report-Only" | "Cross-Origin-Resource-Policy" | "CTA-Common-Access-Token" | "DASL" | "Date" | "DAV" | "Default-Style" | "Delta-Base" | "Deprecation" | "Depth" | "Derived-From" | "Destination" | "Differential-ID" | "Dictionary-ID" | "Digest" | "DPoP" | "DPoP-Nonce" | "Early-Data" | "EDIINT-Features" | "ETag" | "Expect" | "Expect-CT" | "Expires" | "Ext" | "Forwarded" | "From" | "GetProfile" | "Hobareg" | "Host" | "HTTP2-Settings" | "If" | "If-Match" | "If-Modified-Since" | "If-None-Match" | "If-Range" | "If-Schedule-Tag-Match" | "If-Unmodified-Since" | "IM" | "Include-Referred-Token-Binding-ID" | "Isolation" | "Keep-Alive" | "Label" | "Last-Event-ID" | "Last-Modified" | "Link" | "Link-Template" | "Location" | "Lock-Token" | "Man" | "Max-Forwards" | "Memento-Datetime" | "Meter" | "Method-Check" | "Method-Check-Expires" | "MIME-Version" | "Negotiate" | "NEL" | "OData-EntityId" | "OData-Isolation" | "OData-MaxVersion" | "OData-Version" | "Opt" | "Optional-WWW-Authenticate" | "Ordering-Type" | "Origin" | "Origin-Agent-Cluster" | "OSCORE" | "OSLC-Core-Version" | "Overwrite" | "P3P" | "PEP" | "PEP-Info" | "Permissions-Policy" | "PICS-Label" | "Ping-From" | "Ping-To" | "Position" | "Pragma" | "Prefer" | "Preference-Applied" | "Priority" | "ProfileObject" | "Protocol" | "Protocol-Info" | "Protocol-Query" | "Protocol-Request" | "Proxy-Authenticate" | "Proxy-Authentication-Info" | "Proxy-Authorization" | "Proxy-Features" | "Proxy-Instruction" | "Proxy-Status" | "Public" | "Public-Key-Pins" | "Public-Key-Pins-Report-Only" | "Range" | "Redirect-Ref" | "Referer" | "Referer-Root" | "Referrer-Policy" | "Refresh" | "Repeatability-Client-ID" | "Repeatability-First-Sent" | "Repeatability-Request-ID" | "Repeatability-Result" | "Replay-Nonce" | "Reporting-Endpoints" | "Repr-Digest" | "Retry-After" | "Safe" | "Schedule-Reply" | "Schedule-Tag" | "Sec-GPC" | "Sec-Purpose" | "Sec-Token-Binding" | "Sec-WebSocket-Accept" | "Sec-WebSocket-Extensions" | "Sec-WebSocket-Key" | "Sec-WebSocket-Protocol" | "Sec-WebSocket-Version" | "Security-Scheme" | "Server" | "Server-Timing" | "Set-Cookie" | "Set-Cookie2" | "SetProfile" | "Signature" | "Signature-Input" | "SLUG" | "SoapAction" | "Status-URI" | "Strict-Transport-Security" | "Sunset" | "Surrogate-Capability" | "Surrogate-Control" | "TCN" | "TE" | "Timeout" | "Timing-Allow-Origin" | "Topic" | "Traceparent" | "Tracestate" | "Trailer" | "Transfer-Encoding" | "TTL" | "Upgrade" | "Urgency" | "URI" | "Use-As-Dictionary" | "User-Agent" | "Variant-Vary" | "Vary" | "Via" | "Want-Content-Digest" | "Want-Digest" | "Want-Repr-Digest" | "Warning" | "WWW-Authenticate" | "X-Content-Type-Options" | "X-Frame-Options"; type ResponseHeader = "Access-Control-Allow-Credentials" | "Access-Control-Allow-Headers" | "Access-Control-Allow-Methods" | "Access-Control-Allow-Origin" | "Access-Control-Expose-Headers" | "Access-Control-Max-Age" | "Age" | "Allow" | "Cache-Control" | "Clear-Site-Data" | "Content-Disposition" | "Content-Encoding" | "Content-Language" | "Content-Length" | "Content-Location" | "Content-Range" | "Content-Security-Policy" | "Content-Security-Policy-Report-Only" | "Content-Type" | "Cookie" | "Cross-Origin-Embedder-Policy" | "Cross-Origin-Opener-Policy" | "Cross-Origin-Resource-Policy" | "Date" | "ETag" | "Expires" | "Last-Modified" | "Location" | "Permissions-Policy" | "Pragma" | "Retry-After" | "Save-Data" | "Sec-CH-Prefers-Color-Scheme" | "Sec-CH-Prefers-Reduced-Motion" | "Sec-CH-UA" | "Sec-CH-UA-Arch" | "Sec-CH-UA-Bitness" | "Sec-CH-UA-Form-Factor" | "Sec-CH-UA-Full-Version" | "Sec-CH-UA-Full-Version-List" | "Sec-CH-UA-Mobile" | "Sec-CH-UA-Model" | "Sec-CH-UA-Platform" | "Sec-CH-UA-Platform-Version" | "Sec-CH-UA-WoW64" | "Sec-Fetch-Dest" | "Sec-Fetch-Mode" | "Sec-Fetch-Site" | "Sec-Fetch-User" | "Sec-GPC" | "Server" | "Server-Timing" | "Service-Worker-Navigation-Preload" | "Set-Cookie" | "Strict-Transport-Security" | "Timing-Allow-Origin" | "Trailer" | "Transfer-Encoding" | "Upgrade" | "Vary" | "WWW-Authenticate" | "Warning" | "X-Content-Type-Options" | "X-DNS-Prefetch-Control" | "X-Frame-Options" | "X-Permitted-Cross-Domain-Policies" | "X-Powered-By" | "X-Robots-Tag" | "X-XSS-Protection"; type CustomHeader = string & {}; //#endregion //#region ../../node_modules/hono/dist/types/utils/http-status.d.ts /** * @module * HTTP Status utility. */ type InfoStatusCode = 100 | 101 | 102 | 103; type SuccessStatusCode = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226; type DeprecatedStatusCode = 305 | 306; type RedirectStatusCode = 300 | 301 | 302 | 303 | 304 | DeprecatedStatusCode | 307 | 308; type ClientErrorStatusCode = 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; type ServerErrorStatusCode = 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511; /** * `UnofficialStatusCode` can be used to specify an unofficial status code. * @example * * ```ts * app.get('/unknown', (c) => { * return c.text("Unknown Error", 520 as UnofficialStatusCode) * }) * ``` */ type UnofficialStatusCode = -1; /** * If you want to use an unofficial status, use `UnofficialStatusCode`. */ type StatusCode = InfoStatusCode | SuccessStatusCode | RedirectStatusCode | ClientErrorStatusCode | ServerErrorStatusCode | UnofficialStatusCode; type ContentlessStatusCode = 101 | 204 | 205 | 304; type ContentfulStatusCode = Exclude; //#endregion //#region ../../node_modules/hono/dist/types/utils/types.d.ts type UnionToIntersection = (U$1 extends any ? (k: U$1) => void : never) extends ((k: infer I) => void) ? I : never; type RemoveBlankRecord = T$1 extends Record ? K extends string ? T$1 : never : never; type IfAnyThenEmptyObject = 0 extends 1 & T$1 ? {} : T$1; type JSONPrimitive = string | boolean | number | null; type JSONArray = (JSONPrimitive | JSONObject | JSONArray)[]; type JSONObject = { [key: string]: JSONPrimitive | JSONArray | JSONObject | object | InvalidJSONValue; }; type InvalidJSONValue = undefined | symbol | ((...args: unknown[]) => unknown); type InvalidToNull = T$1 extends InvalidJSONValue ? null : T$1; type IsInvalid = T$1 extends InvalidJSONValue ? true : false; /** * symbol keys are omitted through `JSON.stringify` */ type OmitSymbolKeys = { [K in keyof T$1 as K extends symbol ? never : K]: T$1[K] }; type JSONValue = JSONObject | JSONArray | JSONPrimitive; type JSONParsed = T$1 extends { toJSON(): infer J; } ? (() => J) extends (() => JSONPrimitive) ? J : (() => J) extends (() => { toJSON(): unknown; }) ? {} : JSONParsed : T$1 extends JSONPrimitive ? T$1 : T$1 extends InvalidJSONValue ? never : T$1 extends ReadonlyArray ? { [K in keyof T$1]: JSONParsed> } : T$1 extends Set | Map ? {} : T$1 extends object ? { [K in keyof OmitSymbolKeys as IsInvalid extends true ? never : K]: boolean extends IsInvalid ? JSONParsed | undefined : JSONParsed } : never; /** * Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability. * @copyright from sindresorhus/type-fest */ type Simplify = { [KeyType in keyof T$1]: T$1[KeyType] } & {}; /** * A simple extension of Simplify that will deeply traverse array elements. */ type SimplifyDeepArray = T$1 extends any[] ? { [E in keyof T$1]: SimplifyDeepArray } : Simplify; type IsAny = boolean extends (T$1 extends never ? true : false) ? true : false; //#endregion //#region ../../node_modules/hono/dist/types/types.d.ts type Bindings = object; type Variables = object; type BlankEnv = {}; type Env = { Bindings?: Bindings; Variables?: Variables; }; type Next = () => Promise; type ExtractInput = I$1 extends Input ? unknown extends I$1["in"] ? {} : I$1["in"] : I$1; type Input = { in?: {}; out?: {}; outputFormat?: ResponseFormat; }; type BlankSchema = {}; type BlankInput = {}; interface RouterRoute { path: string; method: string; handler: H; } type HandlerResponse = Response | TypedResponse | Promise>; type Handler = any> = (c: Context, next: Next) => R$1; type MiddlewareHandler = (c: Context, next: Next) => Promise; type H = any> = Handler | MiddlewareHandler; type NotFoundHandler = (c: Context) => Response | Promise; interface HTTPResponseError extends Error { getResponse: () => Response; } type ErrorHandler = (err: Error | HTTPResponseError, c: Context) => Response | Promise; interface HandlerInterface {

extends never ? BasePath : ExtractStringKey), I extends Input = BlankInput, R extends HandlerResponse = any, E2 extends Env = E$1>(handler: H): Hono, S$1 & ToSchema>, BasePath>;

extends never ? BasePath : ExtractStringKey), I extends Input = BlankInput, I2 extends Input = I, R extends HandlerResponse = any, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>>(...handlers: [H, H]): Hono, S$1 & ToSchema>, BasePath>;

= MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, E2 extends Env = E$1>(path: P, handler: H): Hono, I, MergeTypedResponse>, BasePath>;

extends never ? BasePath : ExtractStringKey), R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>>(...handlers: [H, H, H]): Hono, S$1 & ToSchema>, BasePath>;

= MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>>(path: P, ...handlers: [H, H]): Hono, I2, MergeTypedResponse>, BasePath>;

extends never ? BasePath : ExtractStringKey), R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>>(...handlers: [H, H, H, H]): Hono, S$1 & ToSchema>, BasePath>;

= MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>>(path: P, ...handlers: [H, H, H]): Hono, I3, MergeTypedResponse>, BasePath>;

extends never ? BasePath : ExtractStringKey), R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>>(...handlers: [H, H, H, H, H]): Hono, S$1 & ToSchema>, BasePath>;

= MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>>(path: P, ...handlers: [H, H, H, H]): Hono, I4, MergeTypedResponse>, BasePath>;

extends never ? BasePath : ExtractStringKey), R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>>(...handlers: [H, H, H, H, H, H]): Hono, S$1 & ToSchema>, BasePath>;

= MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>>(path: P, ...handlers: [H, H, H, H, H]): Hono, I5, MergeTypedResponse>, BasePath>;

extends never ? BasePath : ExtractStringKey), R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>>(...handlers: [H, H, H, H, H, H, H]): Hono, S$1 & ToSchema>, BasePath>;

= MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>>(path: P, ...handlers: [H, H, H, H, H, H]): Hono, I6, MergeTypedResponse>, BasePath>;

extends never ? BasePath : ExtractStringKey), R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8]>>(...handlers: [H, H, H, H, H, H, H, H]): Hono, S$1 & ToSchema>, BasePath>;

= MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>>(path: P, ...handlers: [H, H, H, H, H, H, H]): Hono, I7, MergeTypedResponse>, BasePath>;

extends never ? BasePath : ExtractStringKey), R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8, E9]>>(...handlers: [H, H, H, H, H, H, H, H, H]): Hono, S$1 & ToSchema>, BasePath>;

= MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8]>>(path: P, ...handlers: [H, H, H, H, H, H, H, H]): Hono, I8, MergeTypedResponse>, BasePath>;

extends never ? BasePath : ExtractStringKey), R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, I10 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8 & I9, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8, E9]>, E11 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8, E9, E10]>>(...handlers: [H, H, H, H, H, H, H, H, H, H]): Hono, S$1 & ToSchema>, BasePath>;

= MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8, E9]>>(path: P, ...handlers: [H, H, H, H, H, H, H, H, H]): Hono, I9, MergeTypedResponse>, BasePath>;

= MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, I10 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8 & I9, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8, E9]>, E11 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8, E9, E10]>>(path: P, ...handlers: [H, H, H, H, H, H, H, H, H, H]): Hono, I10, MergeTypedResponse>, BasePath>;

extends never ? BasePath : ExtractStringKey), I extends Input = BlankInput, R extends HandlerResponse = any>(...handlers: H[]): Hono>, BasePath>;

= any>(path: P, ...handlers: H, I, R>[]): Hono, I, MergeTypedResponse>, BasePath>;

= any, I extends Input = BlankInput>(path: P): Hono, I, MergeTypedResponse>, BasePath>; } interface MiddlewareHandlerInterface { (...handlers: MiddlewareHandler>>[]): Hono, S$1, BasePath>; (handler: MiddlewareHandler>>): Hono, S$1, BasePath>; , P extends string = MergePath>>(...handlers: [MiddlewareHandler, MiddlewareHandler]): Hono, S$1, BasePath>;

= MergePath, E2 extends Env = E$1>(path: P, handler: MiddlewareHandler): Hono, ChangePathOfSchema, BasePath>; , E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, P extends string = MergePath>>(...handlers: [MiddlewareHandler, MiddlewareHandler, MiddlewareHandler]): Hono, S$1, BasePath>;

= MergePath, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>>(path: P, ...handlers: [MiddlewareHandler, MiddlewareHandler]): Hono, ChangePathOfSchema, BasePath>; , E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, P extends string = MergePath>>(...handlers: [MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler]): Hono, S$1, BasePath>;

= MergePath, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>>(path: P, ...handlers: [MiddlewareHandler, MiddlewareHandler, MiddlewareHandler]): Hono, ChangePathOfSchema, BasePath>; , E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, P extends string = MergePath>>(...handlers: [MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler]): Hono, S$1, BasePath>;

= MergePath, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>>(path: P, ...handlers: [MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler]): Hono, ChangePathOfSchema, BasePath>; , E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, P extends string = MergePath>>(...handlers: [MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler]): Hono, S$1, BasePath>;

= MergePath, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>>(path: P, ...handlers: [MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler]): Hono, ChangePathOfSchema, BasePath>; , E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>, P extends string = MergePath>>(...handlers: [MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler]): Hono, S$1, BasePath>;

= MergePath, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>>(path: P, ...handlers: [MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler]): Hono, ChangePathOfSchema, BasePath>; , E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8]>, P extends string = MergePath>>(...handlers: [MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler]): Hono, S$1, BasePath>;

= MergePath, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>>(path: P, ...handlers: [MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler]): Hono, ChangePathOfSchema, BasePath>; , E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8, E9]>, P extends string = MergePath>>(...handlers: [MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler]): Hono, S$1, BasePath>;

= MergePath, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8]>>(path: P, ...handlers: [MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler]): Hono, ChangePathOfSchema, BasePath>; , E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8, E9]>, E11 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8, E9, E10]>, P extends string = MergePath>>(...handlers: [MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler]): Hono, S$1, BasePath>;

= MergePath, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8, E9]>>(path: P, ...handlers: [MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler, MiddlewareHandler]): Hono, ChangePathOfSchema, BasePath>;

(path: P, ...handlers: MiddlewareHandler>[]): Hono; } interface OnHandlerInterface { = MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, E2 extends Env = E$1>(method: M, path: P, handler: H): Hono, S$1 & ToSchema, I, MergeTypedResponse>, BasePath>; = MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>>(method: M, path: P, ...handlers: [H, H]): Hono, S$1 & ToSchema, I2, MergeTypedResponse>, BasePath>; = MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>>(method: M, path: P, ...handlers: [H, H, H]): Hono, S$1 & ToSchema, I3, MergeTypedResponse>, BasePath>; = MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>>(method: M, path: P, ...handlers: [H, H, H, H]): Hono, S$1 & ToSchema, I4, MergeTypedResponse>, BasePath>; = MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>>(method: M, path: P, ...handlers: [H, H, H, H, H]): Hono, S$1 & ToSchema, I5, MergeTypedResponse>, BasePath>; = MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>>(method: M, path: P, ...handlers: [H, H, H, H, H, H]): Hono, S$1 & ToSchema, I6, MergeTypedResponse>, BasePath>; = MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>>(method: M, path: P, ...handlers: [H, H, H, H, H, H, H]): Hono, S$1 & ToSchema, I7, MergeTypedResponse>, BasePath>; = MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8]>>(method: M, path: P, ...handlers: [H, H, H, H, H, H, H, H]): Hono, S$1 & ToSchema, I8, MergeTypedResponse>, BasePath>; = MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8, E9]>>(method: M, path: P, ...handlers: [H, H, H, H, H, H, H, H, H]): Hono, S$1 & ToSchema, I9, MergeTypedResponse>, BasePath>; = MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, I10 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8 & I9, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8, E9]>, E11 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8, E9, E10]>>(method: M, path: P, ...handlers: [H, H, H, H, H, H, H, H, H, H]): Hono, S$1 & ToSchema, I10, MergeTypedResponse>>, BasePath>; = any, I extends Input = BlankInput>(method: M, path: P, ...handlers: H, I, R>[]): Hono, I, MergeTypedResponse>, BasePath>; = MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, E2 extends Env = E$1>(methods: Ms, path: P, handler: H): Hono, S$1 & ToSchema, I, MergeTypedResponse>, BasePath>; = MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>>(methods: Ms, path: P, ...handlers: [H, H]): Hono, S$1 & ToSchema, I2, MergeTypedResponse>, BasePath>; = MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>>(methods: Ms, path: P, ...handlers: [H, H, H]): Hono, S$1 & ToSchema, I3, MergeTypedResponse>, BasePath>; = MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>>(methods: Ms, path: P, ...handlers: [H, H, H, H]): Hono, S$1 & ToSchema, I4, MergeTypedResponse>, BasePath>; = MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>>(methods: Ms, path: P, ...handlers: [H, H, H, H, H]): Hono, S$1 & ToSchema, I5, MergeTypedResponse>, BasePath>; = MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>>(methods: Ms, path: P, ...handlers: [H, H, H, H, H, H]): Hono, S$1 & ToSchema, I6, MergeTypedResponse>, BasePath>; = MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>>(methods: Ms, path: P, ...handlers: [H, H, H, H, H, H, H]): Hono, S$1 & ToSchema, I7, MergeTypedResponse>, BasePath>; = MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8]>>(methods: Ms, path: P, ...handlers: [H, H, H, H, H, H, H, H]): Hono, S$1 & ToSchema, I8, MergeTypedResponse>, BasePath>; = MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8, E9]>>(methods: Ms, path: P, ...handlers: [H, H, H, H, H, H, H, H, H]): Hono, S$1 & ToSchema, I9, MergeTypedResponse>>, BasePath>; = MergePath, R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, I4 extends Input = I & I2 & I3, I5 extends Input = I & I2 & I3 & I4, I6 extends Input = I & I2 & I3 & I4 & I5, I7 extends Input = I & I2 & I3 & I4 & I5 & I6, I8 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7, I9 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8, I10 extends Input = I & I2 & I3 & I4 & I5 & I6 & I7 & I8 & I9, E2 extends Env = E$1, E3 extends Env = IntersectNonAnyTypes<[E$1, E2]>, E4 extends Env = IntersectNonAnyTypes<[E$1, E2, E3]>, E5 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4]>, E6 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5]>, E7 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6]>, E8 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7]>, E9 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8]>, E10 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8, E9]>, E11 extends Env = IntersectNonAnyTypes<[E$1, E2, E3, E4, E5, E6, E7, E8, E9, E10]>>(methods: Ms, path: P, ...handlers: [H, H, H, H, H, H, H, H, H, H]): Hono, S$1 & ToSchema, I10, MergeTypedResponse>>, BasePath>;

= any, I extends Input = BlankInput>(methods: string[], path: P, ...handlers: H, I, R>[]): Hono, I, MergeTypedResponse>, BasePath>; = any, E2 extends Env = E$1>(methods: string | string[], paths: string[], ...handlers: H[]): Hono>, BasePath>; } type ExtractStringKey = keyof S$1 & string; type ToSchema = Simplify<{ [K in P$1]: { [K2 in M$1 as AddDollar]: Simplify<{ input: AddParam, P$1>; } & (IsAny extends true ? { output: {}; outputFormat: ResponseFormat; status: StatusCode; } : RorO extends TypedResponse ? { output: unknown extends T ? {} : T; outputFormat: I$1 extends { outputFormat: string; } ? I$1["outputFormat"] : F; status: U; } : { output: unknown extends RorO ? {} : RorO; outputFormat: unknown extends RorO ? "json" : I$1 extends { outputFormat: string; } ? I$1["outputFormat"] : "json"; status: StatusCode; })> } }>; type Schema = { [Path: string]: { [Method: `$${Lowercase}`]: Endpoint; }; }; type ChangePathOfSchema = keyof S$1 extends never ? { [K in Path]: {} } : { [K in keyof S$1 as Path]: S$1[K] }; type Endpoint = { input: any; output: any; outputFormat: ResponseFormat; status: StatusCode; }; type ExtractParams = string extends Path ? Record : Path extends `${infer _Start}:${infer Param}/${infer Rest}` ? { [K in Param | keyof ExtractParams<`/${Rest}`>]: string } : Path extends `${infer _Start}:${infer Param}` ? { [K in Param]: string } : never; type FlattenIfIntersect = T$1 extends infer O ? { [K in keyof O]: O[K] } : never; type MergeSchemaPath = { [P in keyof OrigSchema as MergePath]: [OrigSchema[P]] extends [Record] ? { [M in keyof OrigSchema[P]]: MergeEndpointParamsWithPath } : never }; type MergeEndpointParamsWithPath = T$1 extends unknown ? { input: T$1["input"] extends { param: infer _; } ? ExtractParams extends never ? T$1["input"] : FlattenIfIntersect as K extends `${infer Prefix}{${infer _}}` ? Prefix : K]: string }; }> : RemoveBlankRecord> extends never ? T$1["input"] : T$1["input"] & { param: { [K in keyof ExtractParams as K extends `${infer Prefix}{${infer _}}` ? Prefix : K]: string }; }; output: T$1["output"]; outputFormat: T$1["outputFormat"]; status: T$1["status"]; } : never; type AddParam = ParamKeys extends never ? I$1 : I$1 extends { param: infer _; } ? I$1 : I$1 & { param: UnionToIntersection>>; }; type AddDollar = `$${Lowercase}`; type MergePath = B extends "" ? MergePath : A extends "" ? B : A extends "/" ? B : A extends `${infer P}/` ? B extends `/${infer Q}` ? `${P}/${Q}` : `${P}/${B}` : B extends `/${infer Q}` ? Q extends "" ? A : `${A}/${Q}` : `${A}/${B}`; type KnownResponseFormat = "json" | "text" | "redirect"; type ResponseFormat = KnownResponseFormat | string; type TypedResponse = { _data: T$1; _status: U$1; _format: F$1; }; type MergeTypedResponse = T$1 extends Promise ? T2 extends TypedResponse ? T2 : TypedResponse : T$1 extends TypedResponse ? T$1 : TypedResponse; type FormValue = string | Blob; type ParsedFormValue = string | File; type ValidationTargets = { json: any; form: Record; query: Record; param: Record; header: Record; cookie: Record; }; type ParamKey = Component$1 extends `:${infer NameWithPattern}` ? NameWithPattern extends `${infer Name}{${infer Rest}` ? Rest extends `${infer _Pattern}?` ? `${Name}?` : Name : NameWithPattern : never; type ParamKeys = Path extends `${infer Component}/${infer Rest}` ? ParamKey | ParamKeys : ParamKey; type ParamKeyToRecord = T$1 extends `${infer R}?` ? Record : { [K in T$1]: string }; type InputToDataByTarget = T$1 extends { [K in Target]: infer R } ? R : never; type RemoveQuestion = T$1 extends `${infer R}?` ? R : T$1; type ProcessHead = IfAnyThenEmptyObject; type IntersectNonAnyTypes = T$1 extends [infer Head, ...infer Rest] ? ProcessHead & IntersectNonAnyTypes : {}; declare abstract class FetchEventLike { abstract readonly request: Request; abstract respondWith(promise: Response | Promise): void; abstract passThroughOnException(): void; abstract waitUntil(promise: Promise): void; } //#endregion //#region ../../node_modules/hono/dist/types/utils/body.d.ts type BodyDataValueDot = { [x: string]: string | File | BodyDataValueDot; }; type BodyDataValueDotAll = { [x: string]: string | File | (string | File)[] | BodyDataValueDotAll; }; type SimplifyBodyData = { [K in keyof T$1]: string | File | (string | File)[] | BodyDataValueDotAll extends T$1[K] ? string | File | (string | File)[] | BodyDataValueDotAll : string | File | BodyDataValueDot extends T$1[K] ? string | File | BodyDataValueDot : string | File | (string | File)[] extends T$1[K] ? string | File | (string | File)[] : string | File } & {}; type BodyDataValueComponent = string | File | (T$1 extends { all: false; } ? never : T$1 extends { all: true; } | { all: boolean; } ? (string | File)[] : never); type BodyDataValueObject = { [key: string]: BodyDataValueComponent | BodyDataValueObject; }; type BodyDataValue = BodyDataValueComponent | (T$1 extends { dot: false; } ? never : T$1 extends { dot: true; } | { dot: boolean; } ? BodyDataValueObject : never); type BodyData = {}> = SimplifyBodyData>>; type ParseBodyOptions = { /** * Determines whether all fields with multiple values should be parsed as arrays. * @default false * @example * const data = new FormData() * data.append('file', 'aaa') * data.append('file', 'bbb') * data.append('message', 'hello') * * If all is false: * parseBody should return { file: 'bbb', message: 'hello' } * * If all is true: * parseBody should return { file: ['aaa', 'bbb'], message: 'hello' } */ all: boolean; /** * Determines whether all fields with dot notation should be parsed as nested objects. * @default false * @example * const data = new FormData() * data.append('obj.key1', 'value1') * data.append('obj.key2', 'value2') * * If dot is false: * parseBody should return { 'obj.key1': 'value1', 'obj.key2': 'value2' } * * If dot is true: * parseBody should return { obj: { key1: 'value1', key2: 'value2' } } */ dot: boolean; }; //#endregion //#region ../../node_modules/hono/dist/types/request.d.ts type Body = { json: any; text: string; arrayBuffer: ArrayBuffer; blob: Blob; formData: FormData; }; type BodyCache = Partial; declare class HonoRequest { /** * `.raw` can get the raw Request object. * * @see {@link https://hono.dev/docs/api/request#raw} * * @example * ```ts * // For Cloudflare Workers * app.post('/', async (c) => { * const metadata = c.req.raw.cf?.hostMetadata? * ... * }) * ``` */ raw: Request; routeIndex: number; /** * `.path` can get the pathname of the request. * * @see {@link https://hono.dev/docs/api/request#path} * * @example * ```ts * app.get('/about/me', (c) => { * const pathname = c.req.path // `/about/me` * }) * ``` */ path: string; bodyCache: BodyCache; constructor(request: Request, path?: string, matchResult?: Result<[unknown, RouterRoute]>); /** * `.req.param()` gets the path parameters. * * @see {@link https://hono.dev/docs/api/routing#path-parameter} * * @example * ```ts * const name = c.req.param('name') * // or all parameters at once * const { id, comment_id } = c.req.param() * ``` */ param = ParamKeys>(key: P2 extends `${infer _}?` ? never : P2): string; param> = RemoveQuestion>>(key: P2): string | undefined; param(key: string): string | undefined; param(): Simplify>>>; /** * `.query()` can get querystring parameters. * * @see {@link https://hono.dev/docs/api/request#query} * * @example * ```ts * // Query params * app.get('/search', (c) => { * const query = c.req.query('q') * }) * * // Get all params at once * app.get('/search', (c) => { * const { q, limit, offset } = c.req.query() * }) * ``` */ query(key: string): string | undefined; query(): Record; /** * `.queries()` can get multiple querystring parameter values, e.g. /search?tags=A&tags=B * * @see {@link https://hono.dev/docs/api/request#queries} * * @example * ```ts * app.get('/search', (c) => { * // tags will be string[] * const tags = c.req.queries('tags') * }) * ``` */ queries(key: string): string[] | undefined; queries(): Record; /** * `.header()` can get the request header value. * * @see {@link https://hono.dev/docs/api/request#header} * * @example * ```ts * app.get('/', (c) => { * const userAgent = c.req.header('User-Agent') * }) * ``` */ header(name: RequestHeader): string | undefined; header(name: string): string | undefined; header(): Record; /** * `.parseBody()` can parse Request body of type `multipart/form-data` or `application/x-www-form-urlencoded` * * @see {@link https://hono.dev/docs/api/request#parsebody} * * @example * ```ts * app.post('/entry', async (c) => { * const body = await c.req.parseBody() * }) * ``` */ parseBody, T extends BodyData>(options?: Options): Promise; parseBody(options?: Partial): Promise; /** * `.json()` can parse Request body of type `application/json` * * @see {@link https://hono.dev/docs/api/request#json} * * @example * ```ts * app.post('/entry', async (c) => { * const body = await c.req.json() * }) * ``` */ json(): Promise; /** * `.text()` can parse Request body of type `text/plain` * * @see {@link https://hono.dev/docs/api/request#text} * * @example * ```ts * app.post('/entry', async (c) => { * const body = await c.req.text() * }) * ``` */ text(): Promise; /** * `.arrayBuffer()` parse Request body as an `ArrayBuffer` * * @see {@link https://hono.dev/docs/api/request#arraybuffer} * * @example * ```ts * app.post('/entry', async (c) => { * const body = await c.req.arrayBuffer() * }) * ``` */ arrayBuffer(): Promise; /** * Parses the request body as a `Blob`. * @example * ```ts * app.post('/entry', async (c) => { * const body = await c.req.blob(); * }); * ``` * @see https://hono.dev/docs/api/request#blob */ blob(): Promise; /** * Parses the request body as `FormData`. * @example * ```ts * app.post('/entry', async (c) => { * const body = await c.req.formData(); * }); * ``` * @see https://hono.dev/docs/api/request#formdata */ formData(): Promise; /** * Adds validated data to the request. * * @param target - The target of the validation. * @param data - The validated data to add. */ addValidatedData(target: keyof ValidationTargets, data: {}): void; /** * Gets validated data from the request. * * @param target - The target of the validation. * @returns The validated data. * * @see https://hono.dev/docs/api/request#valid */ valid(target: T): InputToDataByTarget; /** * `.url()` can get the request url strings. * * @see {@link https://hono.dev/docs/api/request#url} * * @example * ```ts * app.get('/about/me', (c) => { * const url = c.req.url // `http://localhost:8787/about/me` * ... * }) * ``` */ get url(): string; /** * `.method()` can get the method name of the request. * * @see {@link https://hono.dev/docs/api/request#method} * * @example * ```ts * app.get('/about/me', (c) => { * const method = c.req.method // `GET` * }) * ``` */ get method(): string; /** * `.matchedRoutes()` can return a matched route in the handler * * @see {@link https://hono.dev/docs/api/request#matchedroutes} * * @example * ```ts * app.use('*', async function logger(c, next) { * await next() * c.req.matchedRoutes.forEach(({ handler, method, path }, i) => { * const name = handler.name || (handler.length < 2 ? '[handler]' : '[middleware]') * console.log( * method, * ' ', * path, * ' '.repeat(Math.max(10 - path.length, 0)), * name, * i === c.req.routeIndex ? '<- respond from here' : '' * ) * }) * }) * ``` */ get matchedRoutes(): RouterRoute[]; /** * `routePath()` can retrieve the path registered within the handler * * @see {@link https://hono.dev/docs/api/request#routepath} * * @example * ```ts * app.get('/posts/:id', (c) => { * return c.json({ path: c.req.routePath }) * }) * ``` */ get routePath(): string; } //#endregion //#region ../../node_modules/hono/dist/types/utils/mime.d.ts /** * Union types for BaseMime */ type BaseMime = (typeof _baseMimes)[keyof typeof _baseMimes]; declare const _baseMimes: { readonly aac: "audio/aac"; readonly avi: "video/x-msvideo"; readonly avif: "image/avif"; readonly av1: "video/av1"; readonly bin: "application/octet-stream"; readonly bmp: "image/bmp"; readonly css: "text/css"; readonly csv: "text/csv"; readonly eot: "application/vnd.ms-fontobject"; readonly epub: "application/epub+zip"; readonly gif: "image/gif"; readonly gz: "application/gzip"; readonly htm: "text/html"; readonly html: "text/html"; readonly ico: "image/x-icon"; readonly ics: "text/calendar"; readonly jpeg: "image/jpeg"; readonly jpg: "image/jpeg"; readonly js: "text/javascript"; readonly json: "application/json"; readonly jsonld: "application/ld+json"; readonly map: "application/json"; readonly mid: "audio/x-midi"; readonly midi: "audio/x-midi"; readonly mjs: "text/javascript"; readonly mp3: "audio/mpeg"; readonly mp4: "video/mp4"; readonly mpeg: "video/mpeg"; readonly oga: "audio/ogg"; readonly ogv: "video/ogg"; readonly ogx: "application/ogg"; readonly opus: "audio/opus"; readonly otf: "font/otf"; readonly pdf: "application/pdf"; readonly png: "image/png"; readonly rtf: "application/rtf"; readonly svg: "image/svg+xml"; readonly tif: "image/tiff"; readonly tiff: "image/tiff"; readonly ts: "video/mp2t"; readonly ttf: "font/ttf"; readonly txt: "text/plain"; readonly wasm: "application/wasm"; readonly webm: "video/webm"; readonly weba: "audio/webm"; readonly webp: "image/webp"; readonly woff: "font/woff"; readonly woff2: "font/woff2"; readonly xhtml: "application/xhtml+xml"; readonly xml: "application/xml"; readonly zip: "application/zip"; readonly "3gp": "video/3gpp"; readonly "3g2": "video/3gpp2"; readonly gltf: "model/gltf+json"; readonly glb: "model/gltf-binary"; }; //#endregion //#region ../../node_modules/hono/dist/types/context.d.ts type HeaderRecord = Record<"Content-Type", BaseMime> | Record | Record; /** * Data type can be a string, ArrayBuffer, Uint8Array (buffer), or ReadableStream. */ type Data = string | ArrayBuffer | ReadableStream | Uint8Array; /** * Interface for the execution context in a web worker or similar environment. */ interface ExecutionContext { /** * Extends the lifetime of the event callback until the promise is settled. * * @param promise - A promise to wait for. */ waitUntil(promise: Promise): void; /** * Allows the event to be passed through to subsequent event listeners. */ passThroughOnException(): void; } /** * Interface for context variable mapping. */ interface ContextVariableMap {} /** * Interface for context renderer. */ interface ContextRenderer {} /** * Interface representing a renderer for content. * * @interface DefaultRenderer * @param {string | Promise} content - The content to be rendered, which can be either a string or a Promise resolving to a string. * @returns {Response | Promise} - The response after rendering the content, which can be either a Response or a Promise resolving to a Response. */ interface DefaultRenderer { (content: string | Promise): Response | Promise; } /** * Renderer type which can either be a ContextRenderer or DefaultRenderer. */ type Renderer = ContextRenderer extends Function ? ContextRenderer : DefaultRenderer; /** * Extracts the props for the renderer. */ type PropsForRenderer = [...Required>] extends [unknown, infer Props] ? Props : unknown; type Layout> = (props: T$1) => any; /** * Interface for getting context variables. * * @template E - Environment type. */ interface Get { (key: Key): E$1["Variables"][Key]; (key: Key): ContextVariableMap[Key]; } /** * Interface for setting context variables. * * @template E - Environment type. */ interface Set$1 { (key: Key, value: E$1["Variables"][Key]): void; (key: Key, value: ContextVariableMap[Key]): void; } /** * Interface for creating a new response. */ interface NewResponse { (data: Data | null, status?: StatusCode, headers?: HeaderRecord): Response; (data: Data | null, init?: ResponseOrInit): Response; } /** * Interface for responding with a body. */ interface BodyRespond { (data: Data, status?: U, headers?: HeaderRecord): Response & TypedResponse; (data: null, status?: U, headers?: HeaderRecord): Response & TypedResponse; (data: Data, init?: ResponseOrInit): Response & TypedResponse; (data: null, init?: ResponseOrInit): Response & TypedResponse; } /** * Interface for responding with text. * * @interface TextRespond * @template T - The type of the text content. * @template U - The type of the status code. * * @param {T} text - The text content to be included in the response. * @param {U} [status] - An optional status code for the response. * @param {HeaderRecord} [headers] - An optional record of headers to include in the response. * * @returns {Response & TypedResponse} - The response after rendering the text content, typed with the provided text and status code types. */ interface TextRespond { (text: T, status?: U, headers?: HeaderRecord): Response & TypedResponse; (text: T, init?: ResponseOrInit): Response & TypedResponse; } /** * Interface for responding with JSON. * * @interface JSONRespond * @template T - The type of the JSON value or simplified unknown type. * @template U - The type of the status code. * * @param {T} object - The JSON object to be included in the response. * @param {U} [status] - An optional status code for the response. * @param {HeaderRecord} [headers] - An optional record of headers to include in the response. * * @returns {JSONRespondReturn} - The response after rendering the JSON object, typed with the provided object and status code types. */ interface JSONRespond { | InvalidJSONValue, U extends ContentfulStatusCode = ContentfulStatusCode>(object: T, status?: U, headers?: HeaderRecord): JSONRespondReturn; | InvalidJSONValue, U extends ContentfulStatusCode = ContentfulStatusCode>(object: T, init?: ResponseOrInit): JSONRespondReturn; } /** * @template T - The type of the JSON value or simplified unknown type. * @template U - The type of the status code. * * @returns {Response & TypedResponse extends JSONValue ? (JSONValue extends SimplifyDeepArray ? never : JSONParsed) : never, U, 'json'>} - The response after rendering the JSON object, typed with the provided object and status code types. */ type JSONRespondReturn | InvalidJSONValue, U$1 extends ContentfulStatusCode> = Response & TypedResponse extends JSONValue ? JSONValue extends SimplifyDeepArray ? never : JSONParsed : never, U$1, "json">; /** * Interface representing a function that responds with HTML content. * * @param html - The HTML content to respond with, which can be a string or a Promise that resolves to a string. * @param status - (Optional) The HTTP status code for the response. * @param headers - (Optional) A record of headers to include in the response. * @param init - (Optional) The response initialization object. * * @returns A Response object or a Promise that resolves to a Response object. */ interface HTMLRespond { >(html: T, status?: ContentfulStatusCode, headers?: HeaderRecord): T extends string ? Response : Promise; >(html: T, init?: ResponseOrInit): T extends string ? Response : Promise; } /** * Options for configuring the context. * * @template E - Environment type. */ type ContextOptions = { /** * Bindings for the environment. */ env: E$1["Bindings"]; /** * Execution context for the request. */ executionCtx?: FetchEventLike | ExecutionContext | undefined; /** * Handler for not found responses. */ notFoundHandler?: NotFoundHandler; matchResult?: Result<[H, RouterRoute]>; path?: string; }; interface SetHeadersOptions { append?: boolean; } interface SetHeaders { (name: "Content-Type", value?: BaseMime, options?: SetHeadersOptions): void; (name: ResponseHeader, value?: string, options?: SetHeadersOptions): void; (name: string, value?: string, options?: SetHeadersOptions): void; } type ResponseHeadersInit = [string, string][] | Record<"Content-Type", BaseMime> | Record | Record | Headers; interface ResponseInit { headers?: ResponseHeadersInit; status?: T$1; statusText?: string; } type ResponseOrInit = ResponseInit | Response; declare class Context { /** * `.env` can get bindings (environment variables, secrets, KV namespaces, D1 database, R2 bucket etc.) in Cloudflare Workers. * * @see {@link https://hono.dev/docs/api/context#env} * * @example * ```ts * // Environment object for Cloudflare Workers * app.get('*', async c => { * const counter = c.env.COUNTER * }) * ``` */ env: E$1["Bindings"]; finalized: boolean; /** * `.error` can get the error object from the middleware if the Handler throws an error. * * @see {@link https://hono.dev/docs/api/context#error} * * @example * ```ts * app.use('*', async (c, next) => { * await next() * if (c.error) { * // do something... * } * }) * ``` */ error: Error | undefined; /** * Creates an instance of the Context class. * * @param req - The Request object. * @param options - Optional configuration options for the context. */ constructor(req: Request, options?: ContextOptions); /** * `.req` is the instance of {@link HonoRequest}. */ get req(): HonoRequest; /** * @see {@link https://hono.dev/docs/api/context#event} * The FetchEvent associated with the current request. * * @throws Will throw an error if the context does not have a FetchEvent. */ get event(): FetchEventLike; /** * @see {@link https://hono.dev/docs/api/context#executionctx} * The ExecutionContext associated with the current request. * * @throws Will throw an error if the context does not have an ExecutionContext. */ get executionCtx(): ExecutionContext; /** * @see {@link https://hono.dev/docs/api/context#res} * The Response object for the current request. */ get res(): Response; /** * Sets the Response object for the current request. * * @param _res - The Response object to set. */ set res(_res: Response | undefined); /** * `.render()` can create a response within a layout. * * @see {@link https://hono.dev/docs/api/context#render-setrenderer} * * @example * ```ts * app.get('/', (c) => { * return c.render('Hello!') * }) * ``` */ render: Renderer; /** * Sets the layout for the response. * * @param layout - The layout to set. * @returns The layout function. */ setLayout: (layout: Layout) => Layout; /** * Gets the current layout for the response. * * @returns The current layout function. */ getLayout: () => Layout | undefined; /** * `.setRenderer()` can set the layout in the custom middleware. * * @see {@link https://hono.dev/docs/api/context#render-setrenderer} * * @example * ```tsx * app.use('*', async (c, next) => { * c.setRenderer((content) => { * return c.html( * * *

{content}

* * * ) * }) * await next() * }) * ``` */ setRenderer: (renderer: Renderer) => void; /** * `.header()` can set headers. * * @see {@link https://hono.dev/docs/api/context#body} * * @example * ```ts * app.get('/welcome', (c) => { * // Set headers * c.header('X-Message', 'Hello!') * c.header('Content-Type', 'text/plain') * * return c.body('Thank you for coming') * }) * ``` */ header: SetHeaders; status: (status: StatusCode) => void; /** * `.set()` can set the value specified by the key. * * @see {@link https://hono.dev/docs/api/context#set-get} * * @example * ```ts * app.use('*', async (c, next) => { * c.set('message', 'Hono is hot!!') * await next() * }) * ``` */ set: Set$1 extends true ? { Variables: ContextVariableMap & Record; } : E$1>; /** * `.get()` can use the value specified by the key. * * @see {@link https://hono.dev/docs/api/context#set-get} * * @example * ```ts * app.get('/', (c) => { * const message = c.get('message') * return c.text(`The message is "${message}"`) * }) * ``` */ get: Get extends true ? { Variables: ContextVariableMap & Record; } : E$1>; /** * `.var` can access the value of a variable. * * @see {@link https://hono.dev/docs/api/context#var} * * @example * ```ts * const result = c.var.client.oneMethod() * ``` */ get var(): Readonly extends true ? Record : E$1["Variables"])>; newResponse: NewResponse; /** * `.body()` can return the HTTP response. * You can set headers with `.header()` and set HTTP status code with `.status`. * This can also be set in `.text()`, `.json()` and so on. * * @see {@link https://hono.dev/docs/api/context#body} * * @example * ```ts * app.get('/welcome', (c) => { * // Set headers * c.header('X-Message', 'Hello!') * c.header('Content-Type', 'text/plain') * // Set HTTP status code * c.status(201) * * // Return the response body * return c.body('Thank you for coming') * }) * ``` */ body: BodyRespond; /** * `.text()` can render text as `Content-Type:text/plain`. * * @see {@link https://hono.dev/docs/api/context#text} * * @example * ```ts * app.get('/say', (c) => { * return c.text('Hello!') * }) * ``` */ text: TextRespond; /** * `.json()` can render JSON as `Content-Type:application/json`. * * @see {@link https://hono.dev/docs/api/context#json} * * @example * ```ts * app.get('/api', (c) => { * return c.json({ message: 'Hello!' }) * }) * ``` */ json: JSONRespond; html: HTMLRespond; /** * `.redirect()` can Redirect, default status code is 302. * * @see {@link https://hono.dev/docs/api/context#redirect} * * @example * ```ts * app.get('/redirect', (c) => { * return c.redirect('/') * }) * app.get('/redirect-permanently', (c) => { * return c.redirect('/', 301) * }) * ``` */ redirect: (location: string | URL, status?: T) => Response & TypedResponse; /** * `.notFound()` can return the Not Found Response. * * @see {@link https://hono.dev/docs/api/context#notfound} * * @example * ```ts * app.get('/notfound', (c) => { * return c.notFound() * }) * ``` */ notFound: () => Response | Promise; } //#endregion export { Hono as a, Schema as i, BlankSchema as n, HonoOptions as o, Env as r, BlankEnv as t };