Tinyhttp error in types
theoparis opened this issue · 2 comments
theoparis commented
I have tried to use json() with tinyhttp but it says nextfunction | undefined
isnt assignable to nextfunction
.
A workaround would be
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
app.use([(req, res, next) => bodyParser.json()(req, res, next!), logger()]);
Which makes sure next function is defnitely defined, however this isn't the best solution to fixing this.
talentlessguy commented
What solution would you propose?
talentlessguy commented
Can't reproduce, so closing