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.
This commit is contained in:
James DiGioia 2019-05-28 15:15:30 -04:00 committed by Sheetal Nandi
parent ee88bfac27
commit e4eadf6935
2 changed files with 3 additions and 3 deletions

View File

@ -119,7 +119,7 @@ export class Observable<T, S> {
sampledBy(otherObs: Observable<any, any>): Observable<T, S>;
sampledBy<U, W>(otherObs: Observable<U, any>, combinator: (a: T, b: U) => W): Observable<W, S>;
skipUntilBy<U, V>(otherObs: Observable<U, V>): Observable<U, V>;
takeUntilBy<U, V>(otherObs: Observable<U, V>): Observable<U, V>;
takeUntilBy<U, V>(otherObs: Observable<U, V>): Observable<T, S>;
bufferBy<U, V>(otherObs: Observable<U, V>, options?: { flushOnEnd: boolean }): Observable<T[], S>;
bufferWhileBy<U>(otherObs: Observable<boolean, U>, options?: { flushOnEnd?: boolean, flushOnChange?: boolean }): Observable<T[], S>;
awaiting<U, V>(otherObs: Observable<U, V>): Observable<boolean, S>;

View File

@ -219,8 +219,8 @@ import { Observable, Pool, Stream, Property, Event, Emitter } from 'kefir';
}
{
let foo: Stream<number, void> = Kefir.sequentially(100, [1, 2, 3, 4]);
let bar: Stream<number, void> = Kefir.later(250, 0);
let observable04: Stream<number, void> = foo.takeUntilBy<number, void>(bar);
let bar: Stream<string, void> = Kefir.later(250, 'hello');
let observable04: Stream<number, void> = foo.takeUntilBy<string, void>(bar);
}
{
let foo: Stream<number, void> = Kefir.sequentially(100, [1, 2, 3, 4, 5, 6, 7, 8]).delay(40);