This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Observable } from "rxjs"; | |
| import { switchMap, takeUntil } from "rxjs/operators"; | |
| declare const a: Observable<number>; | |
| declare const b: Observable<number>; | |
| declare const notifier: Observable<any>; | |
| const c = a.pipe( | |
| takeUntil(notifier), | |
| switchMap(_ => b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Observable } from "rxjs"; | |
| import { combineLatest, takeUntil } from "rxjs/operators"; | |
| declare const a: Observable<number>; | |
| declare const b: Observable<number>; | |
| declare const notifier: Observable<any>; | |
| const c = a.pipe( | |
| takeUntil(notifier), | |
| combineLatest(b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { combineLatest, Observable } from "rxjs"; | |
| import { takeUntil } from "rxjs/operators"; | |
| declare const a: Observable<number>; | |
| declare const b: Observable<number>; | |
| declare const notifier: Observable<any>; | |
| const c = a.pipe( | |
| takeUntil(notifier), | |
| o => combineLatest(o, b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| MonoTypeOperatorFunction, | |
| Observable, | |
| UnaryFunction | |
| } from "rxjs"; | |
| declare module 'rxjs/internal/util/pipe' { | |
| export function pipe<T>( | |
| ...operators: MonoTypeOperatorFunction<T>[] | |
| ): <R extends T>(source: Observable<R>) => Observable<R>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Observable } from "rxjs"; | |
| declare const auditFrame: <T>(source: Observable<T>) => Observable<T>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { animationFrameScheduler } from "rxjs"; | |
| import { auditTime } from "rxjs/operators"; | |
| export const auditFrame = auditTime(0, animationFrameScheduler); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { animationFrameScheduler, pipe } from "rxjs"; | |
| import { auditTime } from "rxjs/operators"; | |
| export const auditFrame = pipe( | |
| auditTime(0, animationFrameScheduler) | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { pipe } from "rxjs"; | |
| import { debounceTime, distinctUntilChanged } from "rxjs/operators"; | |
| export const debounceInput = pipe( | |
| debounceTime<string>(400), | |
| distinctUntilChanged() | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ConnectableObservable, Observable, Observer, Subject, Subscription, zip } from "rxjs"; | |
| import { first, map, publish } from "rxjs/operators"; | |
| export class NotificationQueue extends Observable<number> { | |
| private _count = 0; | |
| private _indices: Subject<number>; | |
| private _notifications: ConnectableObservable<number>; | |
| constructor(notifier: Observable<any>) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const notifier = new Subject<any>(); | |
| const fork = pages<Repo>("https://api.github.com/users/cartant/starred", notifier).pipe( | |
| concatMap((repos, index) => concat( | |
| from(repos).pipe({ | |
| concatMap(repo => ajax.post(forks_url)), | |
| ignoreElements() | |
| })), | |
| of(index) | |
| ), | |
| tap(notifier) |