forward
The forward() function returns the passed argument without modifying it. Useful to standardize an API that expects a function, or to improve readability in a pipeline.
Interactive example
Syntax
typescript
function forward<
GenericInput extends unknown
>(input: GenericInput): GenericInput;Parameters
input: The value to return as is.
Return value
The value provided as input, unchanged.
See also
forwardLog- Returns the value after logging itjustReturn- Builds a constant function
