-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat: support validate
in args definition
#87
base: main
Are you sure you want to change the base?
Conversation
validate
in args definition
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #87 +/- ##
======================================
Coverage ? 0.00%
======================================
Files ? 13
Lines ? 950
Branches ? 13
======================================
Hits ? 0
Misses ? 937
Partials ? 13 β View full report in Codecov by Sentry. |
if (argDef.validate) { | ||
const word = argDef.validate(value) || ""; | ||
if (argDef.required && typeof word === "string") { | ||
return ( |
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.
Should validate
always fail and show the failure string if it's a string
(even if not an required
arg)?
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.
Looks good to me, had one comment. π
π Linked issue
Fix: #84
β Type of change
π Checklist