ts-book icon indicating copy to clipboard operation
ts-book copied to clipboard

[p.420, 제안] RequestHandler 타입 코드 생략 살리기

Open wiseguy77 opened this issue 1 year ago • 1 comments

맨 끝 생략된 부분(...)이 길지 않아 생략하지 않으면 2번째 줄 "Request와 동일한 타입 매개변수를 갖고 있습니다."라고 설명된 내용을 책에서 바로 확인 할 수 있을 것 같습니다.

export interface RequestHandler<
    P = ParamsDictionary,
    ResBody = any,
    ReqBody = any,
    ReqQuery = ParsedQs,
    LocalsObj extends Record<string, any> = Record<string, any>
> {
    (
        req: Request<P, ResBody, ReqBody, ReqQuery, LocalsObj>,
        res: Response<ResBody, LocalsObj>,
        next: NextFunction,
    ): void;
}

wiseguy77 avatar Sep 08 '23 14:09 wiseguy77