hapijs / joi

The most powerful data validation library for JS
Other
20.95k stars 1.51k forks source link

Optional is missing in definition file #3012

Closed cimbraien closed 9 months ago

cimbraien commented 10 months ago

Runtime

node

Runtime version

20.9.0

Module version

joi 17.11.0

Used with

typescript 5.1.3

Any other relevant information

No response

How can we help?

I did remove the node_modules & lock files, then re installed the dependencies in my project. For some reason the optional() methods are missing from the definition file, I've tried to flush all the npm/yarn cache and reinstall the dependencies, and they're still missing.

Marsup commented 10 months ago

I'm not sure what's wrong with your setup, but it works fine in the playground https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAKQsOAzKERwOQCtnYDcAUMUsAHQQBGuApgMYwAUA3sXJ3ANZ0CeALkTIKAZxhRgAOwDmzAJRUwMYBCkBDADYLiAX3lA

Marsup commented 9 months ago

I'm going to close it for now, if you can provide a reproduction I'll take a look.