Module: Application
Type Aliases
ReturnTypes
Ƭ ReturnTypes<Functions
, Returns
>: Functions
["length"
] extends 0
? Returns
: Functions
extends [infer Function, ...(infer Rest extends VariadicFunction[])] ? ReturnTypes
<Rest
, [...Returns, ReturnType
<Function
>]> : never
ReturnType
utility for multiple functions.
Type parameters
Name | Type |
---|---|
Functions | extends VariadicFunction [] |
Returns | extends any [] = [] |
Functions
apply
▸ apply<Functions
>(...functions
): (...args
: Parameters
<Functions
[0
]>) => ReturnTypes
<Functions
>
Applies all functions on curried arguments and returns an array of results.
Type parameters
Name | Type |
---|---|
Functions | extends VariadicFunction [] |
Parameters
Name | Type |
---|---|
...functions | Functions |
Returns
fn
▸ (...args
): ReturnTypes
<Functions
>
Parameters
Name | Type |
---|---|
...args | Parameters <Functions [0 ]> |
Returns
ReturnTypes
<Functions
>