Comparing version 1.6.3 to 1.6.4
import type { ErrorHandler, NotFoundHandler } from './hono'; | ||
export declare const compose: <C>(middleware: Function[], onError?: ErrorHandler<import("./context").Env> | undefined, onNotFound?: NotFoundHandler<import("./context").Env> | undefined) => (context: C, next?: Function | undefined) => Promise<C>; | ||
export declare const compose: <C>(middleware: Function[], onError?: ErrorHandler<{ | ||
[x: string]: any; | ||
}> | undefined, onNotFound?: NotFoundHandler<{ | ||
[x: string]: any; | ||
}> | undefined) => (context: C, next?: Function | undefined) => Promise<C>; |
@@ -6,3 +6,3 @@ /// <reference types="@cloudflare/workers-types" /> | ||
export declare type Data = string | ArrayBuffer | ReadableStream; | ||
export declare type Env = Record<string, any>; | ||
declare type Env = Record<string, any>; | ||
export declare class Context<RequestParamKeyType extends string = string, E = Env> { | ||
@@ -9,0 +9,0 @@ req: Request<RequestParamKeyType>; |
/// <reference types="@cloudflare/workers-types" /> | ||
import { Context } from './context'; | ||
import type { Env } from './context'; | ||
import type { Router } from './router'; | ||
declare type Env = Record<string, any>; | ||
export declare type Handler<RequestParamKeyType extends string = string, E = Env> = (c: Context<RequestParamKeyType, E>, next: Next) => Response | Promise<Response> | Promise<void> | Promise<Response | undefined>; | ||
@@ -6,0 +6,0 @@ export declare type NotFoundHandler<E = Env> = (c: Context<string, E>) => Response | Promise<Response>; |
@@ -5,3 +5,2 @@ /// <reference path="request.d.ts" /> | ||
export { Context } from './context'; | ||
export type { Env } from './context'; | ||
declare module './hono' { | ||
@@ -8,0 +7,0 @@ interface Hono { |
/// <reference types="@cloudflare/workers-types" /> | ||
import type { Env } from '../../context'; | ||
import type { Handler } from '../../hono'; | ||
@@ -10,2 +9,2 @@ export declare type ServeStaticOptions = { | ||
}; | ||
export declare const serveStatic: (options?: ServeStaticOptions) => Handler<string, Env>; | ||
export declare const serveStatic: (options?: ServeStaticOptions) => Handler; |
{ | ||
"name": "hono", | ||
"version": "1.6.3", | ||
"version": "1.6.4", | ||
"description": "Ultrafast web framework for Cloudflare Workers.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3012
135682