From 17c7f8f05762c1cd4c5b1be53945fb8fdc4a4821 Mon Sep 17 00:00:00 2001 From: Ben Lesh Date: Thu, 15 Mar 2018 14:00:29 -0700 Subject: [PATCH] fix(forkJoin): fix forkJoin typings for forkJoin(Observable[]) (#3436) --- src/internal/observable/forkJoin.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/internal/observable/forkJoin.ts b/src/internal/observable/forkJoin.ts index ea6140713a..338cc1ca75 100644 --- a/src/internal/observable/forkJoin.ts +++ b/src/internal/observable/forkJoin.ts @@ -8,13 +8,22 @@ import { InnerSubscriber } from '../InnerSubscriber'; import { Subscriber } from '../Subscriber'; /* tslint:disable:max-line-length */ +// forkJoin([a$, b$, c$]); +export function forkJoin(sources: [ObservableInput]): Observable; +export function forkJoin(sources: [ObservableInput, ObservableInput]): Observable<[T, T2]>; +export function forkJoin(sources: [ObservableInput, ObservableInput, ObservableInput]): Observable<[T, T2, T3]>; +export function forkJoin(sources: [ObservableInput, ObservableInput, ObservableInput, ObservableInput]): Observable<[T, T2, T3, T4]>; +export function forkJoin(sources: [ObservableInput, ObservableInput, ObservableInput, ObservableInput, ObservableInput]): Observable<[T, T2, T3, T4, T5]>; +export function forkJoin(sources: [ObservableInput, ObservableInput, ObservableInput, ObservableInput, ObservableInput, ObservableInput]): Observable<[T, T2, T3, T4, T5, T6]>; +export function forkJoin(sources: Array>): Observable; + +// forkJoin(a$, b$, c$) +export function forkJoin(v1: ObservableInput): Observable; export function forkJoin(v1: ObservableInput, v2: ObservableInput): Observable<[T, T2]>; export function forkJoin(v1: ObservableInput, v2: ObservableInput, v3: ObservableInput): Observable<[T, T2, T3]>; export function forkJoin(v1: ObservableInput, v2: ObservableInput, v3: ObservableInput, v4: ObservableInput): Observable<[T, T2, T3, T4]>; export function forkJoin(v1: ObservableInput, v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput): Observable<[T, T2, T3, T4, T5]>; export function forkJoin(v1: ObservableInput, v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, v6: ObservableInput): Observable<[T, T2, T3, T4, T5, T6]>; -export function forkJoin(v1: ObservableInput): Observable; -export function forkJoin(sources: Array>): Observable; export function forkJoin(...sources: Array>): Observable; /* tslint:enable:max-line-length */