New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Koa + noImplicitAny #292
Comments
Closing this, as I worked around it by using a custom template that implements the first potential solution I mentioned. |
I was experiencing this so I created a quick PR to do what you suggested in #2. |
Ran into the same issue, #300 looks like good general fix to me :) |
@timdev / @osdiab / @pjoe this fix (#412) is now released in v2.4.7 so you don't need to use a custom template anymore. Also, there were a lot of fantastic improvements that came out in our other releases this week (especially 2.4.4 and 2.4.5 which include automatic controlller crawling and strict input types), so please check out the release notes to see what fun things you can use now. :) |
I'm not confident I'm not missing anything, but in my project the compiler is choking on the generated koa
routes.ts
, complaining that thecontext
andnext
middleware arguments implicitly have typeany
.I see two solutions, both of which may be bad/wrong:
Be explicit about the type of
router
argument here: https://github.com/lukeautry/tsoa/blob/master/src/routeGeneration/templates/koa.ts#L37 - but I assume it's explicitly any in case you're using some router other than koa-router.Be explicit about
context
andnext
, even if it's just explicitany
.If someone can point me in the right direction, I'd be happy to put together a PR.
The text was updated successfully, but these errors were encountered: