From e4eadf6935fac7920c5c4fbcbeb3bbefe3fef1e9 Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Tue, 28 May 2019 15:15:30 -0400 Subject: [PATCH] Fixed type for Kefir.Observable#takeUntilBy (#35743) The return value of this method is an Observable of the same type as the source. Because the test uses the same type twice, change the test to use different types so the test asserts the return value has the correct type. --- types/kefir/index.d.ts | 2 +- types/kefir/kefir-tests.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/kefir/index.d.ts b/types/kefir/index.d.ts index f1209b312a..ff93bf4cb7 100644 --- a/types/kefir/index.d.ts +++ b/types/kefir/index.d.ts @@ -119,7 +119,7 @@ export class Observable { sampledBy(otherObs: Observable): Observable; sampledBy(otherObs: Observable, combinator: (a: T, b: U) => W): Observable; skipUntilBy(otherObs: Observable): Observable; - takeUntilBy(otherObs: Observable): Observable; + takeUntilBy(otherObs: Observable): Observable; bufferBy(otherObs: Observable, options?: { flushOnEnd: boolean }): Observable; bufferWhileBy(otherObs: Observable, options?: { flushOnEnd?: boolean, flushOnChange?: boolean }): Observable; awaiting(otherObs: Observable): Observable; diff --git a/types/kefir/kefir-tests.ts b/types/kefir/kefir-tests.ts index f93da894e1..28f37b915e 100644 --- a/types/kefir/kefir-tests.ts +++ b/types/kefir/kefir-tests.ts @@ -219,8 +219,8 @@ import { Observable, Pool, Stream, Property, Event, Emitter } from 'kefir'; } { let foo: Stream = Kefir.sequentially(100, [1, 2, 3, 4]); - let bar: Stream = Kefir.later(250, 0); - let observable04: Stream = foo.takeUntilBy(bar); + let bar: Stream = Kefir.later(250, 'hello'); + let observable04: Stream = foo.takeUntilBy(bar); } { let foo: Stream = Kefir.sequentially(100, [1, 2, 3, 4, 5, 6, 7, 8]).delay(40);