mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
doc: migrate trivial files to doc-comment format (#299986)
* doc: migrate trivial files to doc-comment format * fix: revert some comments * Apply suggestions from code review Thanks @danielSidhion Co-authored-by: Daniel Sidhion <DanielSidhion@users.noreply.github.com> * Update lib/types.nix --------- Co-authored-by: Daniel Sidhion <DanielSidhion@users.noreply.github.com> Co-authored-by: Silvan Mosberger <github@infinisil.com>
This commit is contained in:
parent
52257144db
commit
c0f5f271d1
6 changed files with 53 additions and 37 deletions
|
@ -328,15 +328,24 @@ rec {
|
|||
"signedInt${toString bit}" "${toString bit} bit signed integer";
|
||||
|
||||
in {
|
||||
/* An int with a fixed range.
|
||||
*
|
||||
* Example:
|
||||
* (ints.between 0 100).check (-1)
|
||||
* => false
|
||||
* (ints.between 0 100).check (101)
|
||||
* => false
|
||||
* (ints.between 0 0).check 0
|
||||
* => true
|
||||
# TODO: Deduplicate with docs in nixos/doc/manual/development/option-types.section.md
|
||||
/**
|
||||
An int with a fixed range.
|
||||
|
||||
# Example
|
||||
:::{.example}
|
||||
## `lib.types.ints.between` usage example
|
||||
|
||||
```nix
|
||||
(ints.between 0 100).check (-1)
|
||||
=> false
|
||||
(ints.between 0 100).check (101)
|
||||
=> false
|
||||
(ints.between 0 0).check 0
|
||||
=> true
|
||||
```
|
||||
|
||||
:::
|
||||
*/
|
||||
inherit between;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue