lazyUtils: add assertions to keybind function.
This commit is contained in:
parent
ca7310c274
commit
12b21743bd
1 changed files with 4 additions and 0 deletions
|
@ -60,6 +60,10 @@ let
|
||||||
cmdIsFunction ? false,
|
cmdIsFunction ? false,
|
||||||
opts ? null,
|
opts ? null,
|
||||||
}:
|
}:
|
||||||
|
assert builtins.isString bind;
|
||||||
|
assert builtins.isNull cmd || builtins.isString cmd;
|
||||||
|
assert builtins.isBool cmdIsFunction;
|
||||||
|
assert builtins.isNull opts || builtins.isAttrs opts;
|
||||||
lib.filter (option: !builtins.isNull option) [
|
lib.filter (option: !builtins.isNull option) [
|
||||||
bind
|
bind
|
||||||
(if (cmdIsFunction == true) && (builtins.isString cmd) then (_: cmd) else cmd)
|
(if (cmdIsFunction == true) && (builtins.isString cmd) then (_: cmd) else cmd)
|
||||||
|
|
Loading…
Reference in a new issue