/** * @license Use of this source code is governed by an MIT-style license that * can be found in the LICENSE file at https://github.com/cartant/rxjs-etc */ import { OperatorFunction } from "rxjs"; import { map } from "rxjs/operators"; export function indexElements(): OperatorFunction; export function indexElements( project: (value: T, index: number) => R ): OperatorFunction; export function indexElements( project: (value: T, index: number) => any = (value, index) => index ): OperatorFunction { return map(project); }