-
Notifications
You must be signed in to change notification settings - Fork 44
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
📝 docs: Add pre-defined constraints in documentation #225
📝 docs: Add pre-defined constraints in documentation #225
Conversation
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.
The list of pre-defined constraints is available in the Scaladoc. Do you find this page not helpful enough?
Nonetheless, this PR looks with just some minor changes to make.
docs/_docs/reference/constraint.md
Outdated
@@ -188,3 +188,104 @@ trait RefinedTypeOps[A, C, T]: | |||
def option(value: A): Option[T] = | |||
Option.when(rtc.test(value))(value.asInstanceOf[T]) | |||
``` | |||
|
|||
# Pre-defined constraints |
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 section (and children) should have an extra #
as a h1
(single #
) is used for the title.
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.
Fixed in the next commit
docs/_docs/reference/constraint.md
Outdated
## Global constraints | ||
|
||
Some constraints are available for all types. | ||
They are located in the `io.github.iltotore.iron.constraint.any` object. |
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.
What about using [[package.name]]
instead of backquotes to link it to the Scaladoc?
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.
You're right, i'm fixing this
It's helpful, but I thought having all the constants in a single document may be clearer for some persons (including me 😃) |
As I always struggled to remember pre-defined constraints, I added them to the mini-site.