- mapTuple<TArgs, RArgs>(mappers: { [ index in string | number | symbol]: Mapper<TArgs[index], RArgs[index]> }): ((tuple: TArgs) => RArgs)
-
Type Parameters
-
TArgs extends unknown[]
-
RArgs extends { [ index in string | number | symbol]: unknown }
Parameters
-
mappers: { [ index in string | number | symbol]: Mapper<TArgs[index], RArgs[index]> }
Returns ((tuple: TArgs) => RArgs)
-
- (tuple: TArgs): RArgs
-
Returns RArgs
Maps each element of a tuple individually using its own Mapper.
Example
Param Type
TArgs - the type of the input tuple
Param Type
RArgs - the type of the mapped output tuple
Returns
the mapped tuple