From 51cd11b30f9c505ebbbe93542625bad8b2e4ec46 Mon Sep 17 00:00:00 2001 From: Asad Saeeduddin Date: Tue, 21 Mar 2017 09:26:59 -0400 Subject: [PATCH] fix(Observable): remove redundant reduce overload The first overload signature for `reduce` is redundant, since it is simply a special case of the `reduce` overload. Its presence breaks type inference when the type of the source observable items and the accumulator differ. --- src/operator/reduce.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/operator/reduce.ts b/src/operator/reduce.ts index 10b98b62b2..03555d4e8c 100644 --- a/src/operator/reduce.ts +++ b/src/operator/reduce.ts @@ -3,7 +3,6 @@ import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; /* tslint:disable:max-line-length */ -export function reduce(this: Observable, accumulator: (acc: T, value: T, index: number) => T, seed?: T): Observable; export function reduce(this: Observable, accumulator: (acc: T[], value: T, index: number) => T[], seed?: T[]): Observable; export function reduce(this: Observable, accumulator: (acc: R, value: T, index: number) => R, seed?: R): Observable; /* tslint:enable:max-line-length */