import { OperatorFunction } from '../../interfaces'; import { IterableX } from '../../iterable/iterablex'; import { MapIterable } from '../map'; import { bindCallback } from '../../internal/bindcallback'; export function map( selector: (value: TSource, index: number) => TResult, thisArg?: any ): OperatorFunction { return function mapOperatorFunction(source: Iterable): IterableX { return new MapIterable(source, bindCallback(selector, thisArg, 2)); }; }