Open dcyriller opened 1 year ago
Yeah, hapi should not import typings directly from joi.
I don't know if your suggestion will work, and suspect that it can cause other issues when used.
The real solution is probably to expose those objects through a new generic, that can ideally be inferred.
context
While using the framework for the first time, I encountered a minor issue. It's not critical (in my case, I will simply install
joi
), but I thought you might want to be aware of it. Have a good day!reproduction
In a new node.js project:
async function init() { const server = Hapi.server({ port: 3000, host: 'localhost' });
};
init();
note :
npm i joi
resolves the error.a possible fix
https://github.com/hapijs/hapi/blob/23d65502a6cf5372f6db0acfaac9a5188b9050cd/lib/types/route.d.ts#L2
could it be?