docs: migrate lib.importers to doc-comments

This commit is contained in:
KFears 2025-09-14 20:18:12 +04:00
parent 9ba13a521e
commit fca12d06bc
Signed by: KFearsoff
SSH key fingerprint: SHA256:sn39ts1xvi/KGQNlqDyrj8nNlhp9ilndgIolXKnPraw

View file

@ -1,13 +1,23 @@
lib: {
## Import a JSON file as a Nix value.
##
## @notest
## @type Path -> a
/**
Import a JSON file as a Nix value.
# Type
```
json :: Path -> Any
```
*/
json = file: builtins.fromJSON (builtins.readFile file);
## Import a TOML file as a Nix value.
##
## @notest
## @type Path -> a
/**
Import a TOML file as a Nix value.
# Type
```
json :: Path -> Any
```
*/
toml = file: builtins.fromTOML (builtins.readFile file);
}