After trying to move from the initial koa-joi-router to this project, we ran into this weird issue where TypeScript is not finding any types corresponding to koa-better-modules/joi-router.
Issue
It happened as soon as we replaced :
The initial koa-joi-router import: import Router, { Handler } from "koa-joi-router";
By this: import Router, { Handler } from "koa-joi-router";
Said error;
Could not find a declaration file for module '@koa-better-modules/joi-router'. 'C:/Dev/m-backend-workspace/node_modules/@koa-better-modules/joi-router/joi-router.js' implicitly has an 'any' type.
Try npm i --save-dev @types/koa-better-modules__joi-router if it exists or add a new declaration (.d.ts) file containing declare module '@koa-better-modules/joi-router';
Hey, hope you're doing great !
After trying to move from the initial koa-joi-router to this project, we ran into this weird issue where TypeScript is not finding any types corresponding to koa-better-modules/joi-router.
Issue
It happened as soon as we replaced :
import Router, { Handler } from "koa-joi-router";
import Router, { Handler } from "koa-joi-router";
Said error;
As per TypeScript Documentation on @types, the @koa-better-modules/joi-router is indeed not defined in the Types list.
Temporary solution
A temporary solution would be adding our own types as recommended by Typescript but it's very unlikely to be the most sustainable solution.
We would like to know if your team is considering adding the types for TypeScript projects. Thanks in advance