Skip to content
Myr

fix: `createHandler` Response Types (handler x1) (#2192)

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

* fix: Crate Handler Response Types (handler x1) * chore: denoify * chore: format code * chore: denoify * chore: reformat code & denoify

authored by Shotaro Nakamura · committed by GitHub · parent 253c645 · Browse files · 2 files+8 added−4 removed
This commit

State

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

Diff stats

2 files+8 added−4 removed

  • other:+8 added−4 removed

2 files+8 added−4 removed

modified:deno_dist/helper/factory/index.ts+4 added-2 removed
1/* eslint-disable @typescript-eslint/no-explicit-any */2import type { Env, Input, MiddlewareHandler, H, HandlerResponse } from '../../types.ts'2import type { Env, H, HandlerResponse, Input, MiddlewareHandler } from '../../types.ts'34export class Factory<E extends Env = any, P extends string = any> {5 createMiddleware = <I extends Input = {}>(middleware: MiddlewareHandler<E, P, I>) => middleware67 createHandlers<I extends Input = {}>(handler1: H<E, P, I>): [H<E, P, I>]7 createHandlers<I extends Input = {}, R extends HandlerResponse<any> = any>(8 handler1: H<E, P, I, R>9 ): [H<E, P, I, R>]1011 // handler x212 createHandlers<I extends Input = {}, I2 extends Input = I, R extends HandlerResponse<any> = any>(13 handler1: H<E, P, I, R>,
203 unmodified lines
modified:src/helper/factory/index.ts+4 added-2 removed
1/* eslint-disable @typescript-eslint/no-explicit-any */2import type { Env, Input, MiddlewareHandler, H, HandlerResponse } from '../../types'2import type { Env, H, HandlerResponse, Input, MiddlewareHandler } from '../../types'34export class Factory<E extends Env = any, P extends string = any> {5 createMiddleware = <I extends Input = {}>(middleware: MiddlewareHandler<E, P, I>) => middleware67 createHandlers<I extends Input = {}>(handler1: H<E, P, I>): [H<E, P, I>]7 createHandlers<I extends Input = {}, R extends HandlerResponse<any> = any>(8 handler1: H<E, P, I, R>9 ): [H<E, P, I, R>]1011 // handler x212 createHandlers<I extends Input = {}, I2 extends Input = I, R extends HandlerResponse<any> = any>(13 handler1: H<E, P, I, R>,
203 unmodified lines