Skip to main

map

map

Signature - source.ts#L1549

function map<U>(
    transform: <T>(value: T, index: number) => U,
): <T>(source: Source<T>) => Source<U>

Calls the given transform function for each Push event of the given source and passes through the result.

Parameters

ParameterTypeDescription
transform
<T>(value: T, index: number) => U

A function which accepts a value and an index. The map method calls the transform function one time for each Push event of the given source and passes through the result.

function map<T, U>(transform: (value: T, index: number) => U): Operator<T, U>