mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
lib/types: add doc warning to addCheck (#412364)
This commit is contained in:
commit
f54b76bc01
1 changed files with 7 additions and 1 deletions
|
@ -1455,8 +1455,14 @@ let
|
||||||
nestedTypes.coercedType = coercedType;
|
nestedTypes.coercedType = coercedType;
|
||||||
nestedTypes.finalType = finalType;
|
nestedTypes.finalType = finalType;
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
Augment the given type with an additional type check function.
|
||||||
|
|
||||||
# Augment the given type with an additional type check function.
|
:::{.warning}
|
||||||
|
This function has some broken behavior see: [#396021](https://github.com/NixOS/nixpkgs/issues/396021)
|
||||||
|
Fixing is not trivial, we appreciate any help!
|
||||||
|
:::
|
||||||
|
*/
|
||||||
addCheck = elemType: check: elemType // { check = x: elemType.check x && check x; };
|
addCheck = elemType: check: elemType // { check = x: elemType.check x && check x; };
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue