I cannot get any types
johnnyshankman opened this issue · comments
Johnny Shankman commented
Runtime
node
Runtime version
v20
Module version
"^20.1.4",
Last module version without issue
No response
Used with
No response
Any other relevant information
No response
What are you trying to achieve or the steps to reproduce?
import { Request, ResponseToolkit } from '@hapi/hapi';
lets me import but ResponseToolkit
is just any.
What was the result you got?
What result did you expect?
a real type
Jonas Pauthier commented
Looking at the source code in v20 (like v20.3.0), hapi didn't ship with its own types. The types were added from DT only at v21.1.0: https://github.com/hapijs/hapi/blob/v21.1.0/lib/index.d.ts. Your solution is either:
- Upgrade to latest version of hapi.
- Install
@types/hapi__hapi
to use the DT types.
I'll close this for now since I don't consider this a bug in hapi. We can always reopen if it was a mistake.