Skip to content
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

I cannot get any types #4505

Closed
johnnyshankman opened this issue Jun 4, 2024 · 1 comment · Fixed by #4507
Closed

I cannot get any types #4505

johnnyshankman opened this issue Jun 4, 2024 · 1 comment · Fixed by #4507
Assignees
Labels
non issue Issue is not a problem or requires changes

Comments

@johnnyshankman
Copy link

johnnyshankman commented Jun 4, 2024

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?

any
Screenshot 2024-06-04 at 6 30 26 PM

What result did you expect?

a real type

@johnnyshankman johnnyshankman added the bug Bug or defect label Jun 4, 2024
@Nargonath
Copy link
Member

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:

  1. Upgrade to latest version of hapi.
  2. 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.

@Nargonath Nargonath added non issue Issue is not a problem or requires changes and removed bug Bug or defect labels Jun 5, 2024
@Nargonath Nargonath self-assigned this Jun 5, 2024
damusix added a commit to damusix/hapi that referenced this issue Jun 9, 2024
damusix added a commit to damusix/hapi that referenced this issue Jun 10, 2024
damusix added a commit to damusix/hapi that referenced this issue Jun 10, 2024
Marsup pushed a commit that referenced this issue Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
non issue Issue is not a problem or requires changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants