wbhob / nest-middlewares

Common, injectable middlewares for NestJS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Morgan middleware fail to build on new project

dlancer opened this issue · comments

node_modules/@nest-middlewares/morgan/index.d.ts:4:63 - error TS2314: Generic type 'Options<Request, Response>' requires 2 type argument(s).

4     static configure(format: string | morgan.FormatFn, opts?: morgan.Options): void;
                                                                ~~~~~~~~~~~~~~

node_modules/@nest-middlewares/morgan/index.d.ts:5:67 - error TS2314: Generic type 'Morgan<Request, Response>' requires 2 type argument(s).

5     static token(name: string, callback: morgan.TokenCallbackFn): morgan.Morgan;
                                                                    ~~~~~~~~~~~~~

@dlancer I solved the issue with
image

the types should be included as dependencies for this situation, helps to typecheck the configs - I'll update

actually, it looks like those types are already included. not sure what's going on then

@wbhob I have created a PR for this issue: #38