Skip to content
Myr

fix(factory): correct types inside of `createMiddleware()` (#2081)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* fix(factory): correct types inside of `createMiddleware()` * denoify

authored by Yusuke Wada · committed by GitHub · parent 4ec3a9b · Browse files · 3 files+4 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+4 added−3 removed

  • tests:+2 added−1 removed
  • other:+2 added−2 removed

3 files+4 added−3 removed

modified:deno_dist/helper/factory/index.ts+1 added-1 removed
268 unmodified lines
269 */270export const createFactory = <E extends Env = any, P extends string = any>() => new Factory<E, P>()271272export const createMiddleware = <E extends Env = any, P extends string = any, I extends Input = {}>(273 middleware: MiddlewareHandler273 middleware: MiddlewareHandler<E, P, I>274) => createFactory<E, P>().createMiddleware<I>(middleware)
modified:src/helper/factory/index.test.ts+2 added-1 removed
modified:src/helper/factory/index.ts+1 added-1 removed
268 unmodified lines
269 */270export const createFactory = <E extends Env = any, P extends string = any>() => new Factory<E, P>()271272export const createMiddleware = <E extends Env = any, P extends string = any, I extends Input = {}>(273 middleware: MiddlewareHandler273 middleware: MiddlewareHandler<E, P, I>274) => createFactory<E, P>().createMiddleware<I>(middleware)