Module "@hapi/iron" has no exported interfaces
dm-khanin opened this issue · comments
Hi! You have added index.d.ts
in last release, so we got some problems when compiling the project:
node_modules/@types/hapi__hapi/index.d.ts:32:10 - error TS2305: Module '"../../@hapi/iron/lib"' has no exported member 'SealOptions'.
node_modules/@types/hapi__hapi/index.d.ts:32:23 - error TS2305: Module '"../../@hapi/iron/lib"' has no exported member 'SealOptionsSub'.
Our dependencies:
"@hapi/hapi": "=18.3.1",
"@types/hapi__hapi": "=18.2.5",
"typescript": "=3.5.3"
It seems types definitions for version 5.1.1
had using types from module @hapi/hapi__iron
, where this two interfaces were present
Do you explicitly need it ? It seems to be called Defaults
now.
You know, we don't have @hapi/iron
as a project devendency. Some other modules of hapi family use it, so build failed due to not our manipulations.
I'm trying to use @haip/iron
directly. The usage examples are clear that I'm supposed to be able to import defaults
(lower-case) to get a default instance of the options for seal
and unseal
.
defaults
is in fact exported from index.js
. However, it's not mentioned in index.d.ts
. This makes it hard(er) to use in a typescript project.
Additionally, the index.d.ts
marks the options
parameter of unseal
as optional, but I'm pretty sure that it's required.
I'm using @hapi/iron
version 5.1.2.
EDIT: Hrm, also seal
and unseal
aren't marked as async in index.d.ts
, nor do they indicate that they return a Promise type. 😢
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.