functionArgs
lib.functionArgs
Docs pulled from | This Revision | 44 minutes ago
Extract the expected function arguments from a function.
This works both with nix-native { a, b ? foo, ... }: style
functions and functions with args set with setFunctionArgs. It
has the same return type and semantics as builtins.functionArgs.
Type
functionArgs : (a -> b) -> Map String Bool
Inputs
f-
1. Function argument
Noogle detected
Implementation
The following is the current implementation of this function.
functionArgs =
f:
if f ? __functor then
f.__functionArgs or (functionArgs (f.__functor f))
else
builtins.functionArgs f;