mirror of
https://github.com/honojs/hono.git
synced 2024-12-01 10:51:01 +00:00
bb386a49c9
* fix(types): middleware with different env types * denoify * fix factory helper
12 lines
384 B
TypeScript
12 lines
384 B
TypeScript
import type { Env, Input, MiddlewareHandler } from '../../types.ts'
|
|
|
|
/**
|
|
* @experimental
|
|
* `middleware()` is an experimental feature.
|
|
* The API might be changed.
|
|
*/
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
export const middleware = <E extends Env = any, P extends string = any, I extends Input = {}>(
|
|
middleware: MiddlewareHandler<E, P, I>
|
|
) => middleware
|