Skip to content

7.0.2 typing inaccuracies  #216

@simon-barton

Description

@simon-barton

Support plan

  • is this issue currently blocking your project? (no):
  • is this issue affecting a production system? (no):

Context

  • node version: v16.18.0
  • module version with issue: 7.0.2
  • last module version without issue: 7.0.1
  • environment (e.g. node, browser, native): node
  • used with (e.g. hapi application, another framework, standalone, ...): hapi
  • any other relevant information: TypeScript

What are you trying to achieve or the steps to reproduce?

Our application maintains a list of plugins with the type ServerRegisterPluginObject<T, D>[] which the default export of @hapi/vision adheres to.

The recent typing additions however has the default export as a Plugin rather than a wrapped object. The correct typing should resemble something like @hapi/inert where the Plugin type is wrapped.

What was the result you got?

Incorrect typing. Worked around with @ts-ignore.

What result did you expect?

Accurate typing.

Metadata

Metadata

Assignees

Labels

supportQuestions, discussions, and general support

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions