Skip to content

Commit

Permalink
initial getSubOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon committed Jan 8, 2025
1 parent 3fc2c94 commit 9e4f219
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/types/record.nix
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ let
nestedTypes = lib.optionalAttrs (freeformType != null) {
inherit freeformType;
};
# TODO: getSubOptions for documentation purposes, etc
# TODO: include `_freeformOptions`
getSubOptions = prefix: lib.mapAttrs (name: field:
mergeDefinitions (prefix ++ [ name ]) field.type [ ]
) checkedFields;
};

in
Expand Down

0 comments on commit 9e4f219

Please sign in to comment.