Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EndlessReplaySubject<T>

EndlessReplaySubject extension of Rx.ReplaySubject. This is pretty hacky, but so far I'd found no better way of having Subjects that do no close on multicasted stream completion and on multiple errors. For documentation refer to ReplaySubject docs. The only difference is that EndlessReplaySubject never triggers '.complete()' and does not closes observers on errors (thus allowing to continuously dispatch them).

Type parameters

  • T

Hierarchy

  • ReplaySubject<T>
    • EndlessReplaySubject

Implements

  • Subscribable<T>
  • ISubscription

Index

Constructors

constructor

  • new EndlessReplaySubject(bufferSize?: number, windowTime?: number, scheduler?: IScheduler): EndlessReplaySubject
  • Parameters

    • Optional bufferSize: number
    • Optional windowTime: number
    • Optional scheduler: IScheduler

    Returns EndlessReplaySubject

Properties

_isScalar

_isScalar: boolean

closed

closed: boolean

hasError

hasError: boolean

isStopped

isStopped: boolean

observers

observers: Observer<T>[]

Protected operator

operator: Operator<any, T>

Protected source

source: Observable<any>

thrownError

thrownError: any

Static create

create: Function

Static filter

filter: filter

Static if

if: create

Static mergeAll

mergeAll: mergeAll

Static share

share: share

Static skip

skip: skip

Static take

take: take

Static throw

throw: create

Methods

_getNow

  • _getNow(): number
  • Returns number

Protected _subscribe

  • _subscribe(subscriber: Subscriber<T>): Subscription
  • Parameters

    • subscriber: Subscriber<T>

    Returns Subscription

Protected _trySubscribe

  • _trySubscribe(subscriber: Subscriber<T>): TeardownLogic
  • Parameters

    • subscriber: Subscriber<T>

    Returns TeardownLogic

asObservable

  • asObservable(): Observable<T>
  • Returns Observable<T>

complete

  • complete(): void

error

  • error(error: any): void
  • Override of error method that prevents stopping that Rx.Observer

    Parameters

    • error: any

      Error to be dispatched

    Returns void

forEach

  • forEach(next: function, PromiseCtor?: PromiseConstructor): Promise<void>
  • method

    forEach

    Parameters

    • next: function

      a handler for each value emitted by the observable

        • (value: T): void
        • Parameters

          • value: T

          Returns void

    • Optional PromiseCtor: PromiseConstructor

    Returns Promise<void>

    a promise that either resolves on observable completion or rejects with the handled error

lift

  • lift<R>(operator: Operator<T, R>): Observable<R>
  • Type parameters

    • R

    Parameters

    • operator: Operator<T, R>

    Returns Observable<R>

next

  • next(value: T): void
  • Parameters

    • value: T

    Returns void

pipe

  • pipe(): Observable<T>
  • pipe<A>(op1: OperatorFunction<T, A>): Observable<A>
  • pipe<A, B>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>): Observable<B>
  • pipe<A, B, C>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>): Observable<C>
  • pipe<A, B, C, D>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>, op4: OperatorFunction<C, D>): Observable<D>
  • pipe<A, B, C, D, E>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>, op4: OperatorFunction<C, D>, op5: OperatorFunction<D, E>): Observable<E>
  • pipe<A, B, C, D, E, F>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>, op4: OperatorFunction<C, D>, op5: OperatorFunction<D, E>, op6: OperatorFunction<E, F>): Observable<F>
  • pipe<A, B, C, D, E, F, G>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>, op4: OperatorFunction<C, D>, op5: OperatorFunction<D, E>, op6: OperatorFunction<E, F>, op7: OperatorFunction<F, G>): Observable<G>
  • pipe<A, B, C, D, E, F, G, H>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>, op4: OperatorFunction<C, D>, op5: OperatorFunction<D, E>, op6: OperatorFunction<E, F>, op7: OperatorFunction<F, G>, op8: OperatorFunction<G, H>): Observable<H>
  • pipe<A, B, C, D, E, F, G, H, I>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>, op4: OperatorFunction<C, D>, op5: OperatorFunction<D, E>, op6: OperatorFunction<E, F>, op7: OperatorFunction<F, G>, op8: OperatorFunction<G, H>, op9: OperatorFunction<H, I>): Observable<I>
  • Returns Observable<T>

  • Type parameters

    • A

    Parameters

    • op1: OperatorFunction<T, A>

    Returns Observable<A>

  • Type parameters

    • A

    • B

    Parameters

    • op1: OperatorFunction<T, A>
    • op2: OperatorFunction<A, B>

    Returns Observable<B>

  • Type parameters

    • A

    • B

    • C

    Parameters

    • op1: OperatorFunction<T, A>
    • op2: OperatorFunction<A, B>
    • op3: OperatorFunction<B, C>

    Returns Observable<C>

  • Type parameters

    • A

    • B

    • C

    • D

    Parameters

    • op1: OperatorFunction<T, A>
    • op2: OperatorFunction<A, B>
    • op3: OperatorFunction<B, C>
    • op4: OperatorFunction<C, D>

    Returns Observable<D>

  • Type parameters

    • A

    • B

    • C

    • D

    • E

    Parameters

    • op1: OperatorFunction<T, A>
    • op2: OperatorFunction<A, B>
    • op3: OperatorFunction<B, C>
    • op4: OperatorFunction<C, D>
    • op5: OperatorFunction<D, E>

    Returns Observable<E>

  • Type parameters

    • A

    • B

    • C

    • D

    • E

    • F

    Parameters

    • op1: OperatorFunction<T, A>
    • op2: OperatorFunction<A, B>
    • op3: OperatorFunction<B, C>
    • op4: OperatorFunction<C, D>
    • op5: OperatorFunction<D, E>
    • op6: OperatorFunction<E, F>

    Returns Observable<F>

  • Type parameters

    • A

    • B

    • C

    • D

    • E

    • F

    • G

    Parameters

    • op1: OperatorFunction<T, A>
    • op2: OperatorFunction<A, B>
    • op3: OperatorFunction<B, C>
    • op4: OperatorFunction<C, D>
    • op5: OperatorFunction<D, E>
    • op6: OperatorFunction<E, F>
    • op7: OperatorFunction<F, G>

    Returns Observable<G>

  • Type parameters

    • A

    • B

    • C

    • D

    • E

    • F

    • G

    • H

    Parameters

    • op1: OperatorFunction<T, A>
    • op2: OperatorFunction<A, B>
    • op3: OperatorFunction<B, C>
    • op4: OperatorFunction<C, D>
    • op5: OperatorFunction<D, E>
    • op6: OperatorFunction<E, F>
    • op7: OperatorFunction<F, G>
    • op8: OperatorFunction<G, H>

    Returns Observable<H>

  • Type parameters

    • A

    • B

    • C

    • D

    • E

    • F

    • G

    • H

    • I

    Parameters

    • op1: OperatorFunction<T, A>
    • op2: OperatorFunction<A, B>
    • op3: OperatorFunction<B, C>
    • op4: OperatorFunction<C, D>
    • op5: OperatorFunction<D, E>
    • op6: OperatorFunction<E, F>
    • op7: OperatorFunction<F, G>
    • op8: OperatorFunction<G, H>
    • op9: OperatorFunction<H, I>

    Returns Observable<I>

subscribe

  • subscribe(observer?: PartialObserver<T>): Subscription
  • subscribe(next?: function, error?: function, complete?: function): Subscription
  • Parameters

    • Optional observer: PartialObserver<T>

    Returns Subscription

  • Parameters

    • Optional next: function
        • (value: T): void
        • Parameters

          • value: T

          Returns void

    • Optional error: function
        • (error: any): void
        • Parameters

          • error: any

          Returns void

    • Optional complete: function
        • (): void
        • Returns void

    Returns Subscription

toPromise

  • toPromise<T>(this: Observable<T>): Promise<T>
  • toPromise<T>(this: Observable<T>, PromiseCtor: PromiseConstructor): Promise<T>
  • toPromise<T>(this: Observable<T>, PromiseCtor: PromiseConstructorLike): Promise<T>
  • Type parameters

    • T

    Parameters

    • this: Observable<T>

    Returns Promise<T>

  • Type parameters

    • T

    Parameters

    • this: Observable<T>
    • PromiseCtor: PromiseConstructor

    Returns Promise<T>

  • Type parameters

    • T

    Parameters

    • this: Observable<T>
    • PromiseCtor: PromiseConstructorLike

    Returns Promise<T>

unsubscribe

  • unsubscribe(): void
  • Returns void

Generated using TypeDoc