The type of the function to conditionally execute.
The function to conditionally execute.
Optional
condition: unknownThe condition to check before executing fn
.
The conditionalized function with the same signature as fn
.
Rest
...args: Parameters<F>
Transforms a function such that it only executes when
condition
is truthy.