-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Add support for Joi.any().cast() to string and number types #142
Conversation
Thankyou for the PR! I'll review it soon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be enough to resolve the TS issues
Codecov Report
@@ Coverage Diff @@
## master #142 +/- ##
==========================================
+ Coverage 97.82% 97.84% +0.01%
==========================================
Files 8 8
Lines 414 417 +3
Branches 134 136 +2
==========================================
+ Hits 405 408 +3
Misses 9 9
Continue to review full report at Codecov.
|
looks good me ready to merge? |
@mrjono1 - All set. I somehow missed actually updating the README, but I've now added the cast function noting support for string and number under "Joi Features Supported" section |
@kjb085 thankyou, this has been released under https://github.com/mrjono1/joi-to-typescript/releases/tag/2.2.0 |
Currently any use of
Joi.any().cast()
fails. It supports converting tostring
,number
,Map
, andSet
- given that handling the generics forMap
andSet
adds some additional complexities, I've added the base level of support forstring
andnumber
types.