Skip to content

Commit

Permalink
Fix TypeScript types
Browse files Browse the repository at this point in the history
Are the Types Wrong (https://arethetypeswrong.github.io/?p=%40hapi%2Fhoek%4011.0.4) was reporting the following errors:

* Used fallback condition - Import resolved to types through a conditional package.json export, but only after failing to resolve through an earlier condition. This behavior is a TypeScript bug. It may misrepresent the runtime behavior of this import and should not be relied upon.
* Masquerading as CJS - Import resolved to a CommonJS type declaration file, but an ESM JavaScript file.

This could result in TypeScript errors similar to the following, depending on the specific tsconfig.json options used:

> error TS7016: Could not find a declaration file for module '@hapi/hoek'. 'node_modules/@hapi/hoek/lib/index.mjs' implicitly has an 'any' type.
> There are types at 'node_modules/@hapi/hoek/lib/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@hapi/hoek' library may need to update its package.json or typings.
  • Loading branch information
joshkel committed May 11, 2024
1 parent 7309947 commit e929191
Showing 1 changed file with 480 additions and 0 deletions.
Loading

0 comments on commit e929191

Please sign in to comment.