Options
All
  • Public
  • Public/Protected
  • All
Menu

An Observable BehaviorSubject that also wraps a value in web storage somewhere.

This value is also mute-able. When muted, the value won't change and won't report changes that come from the storage events.

Hierarchy

Implements

Index

Constructors

constructor

Properties

_isScalar

_isScalar: boolean

closed

closed: boolean

hasError

hasError: boolean

isStopped

isStopped: boolean

Private key

key: string

Private muted

muted: boolean

observers

observers: Observer<StoredValue>[]

Protected operator

operator: Operator<any, StoredValue>

Protected source

source: Observable<any>

Private storage

storage: Storage

Private storage$

storage$: Observable<StoredValue>

Private subscriptions

subscriptions: Subscription[] = []

thrownError

thrownError: any

value

Static create

create: Function

Static filter

filter: filter

Static if

if: create

Static map

map: map

Static throw

throw: create

Methods

Protected _subscribe

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

    Returns Subscription

Protected _trySubscribe

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

    Returns TeardownLogic

asObservable

  • Returns Observable<StoredValue>

complete

  • complete(): void
  • Returns void

error

  • error(err: any): void
  • Parameters

    • err: any

    Returns void

forEach

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

    forEach

    Parameters

    • next: function

      a handler for each value emitted by the observable

    • Optional PromiseCtor: undefined | PromiseConstructor

    Returns Promise<void>

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

getValue

  • Returns StoredValue

Private getValueFromStorage

lift

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

    • R

    Parameters

    Returns Observable<R>

mute

  • mute(): void

next

  • Put a stored value into storage and report the value to subscribers.

    StoredValue => will set a new value in storage NoValue => Will remove the value from storage Unknown => Pushed to subscribers, but no side effects StorageError =>

    Parameters

    Returns void

pipe

  • pipe(): Observable<StoredValue>
  • pipe<A>(op1: OperatorFunction<StoredValue, A>): Observable<A>
  • pipe<A, B>(op1: OperatorFunction<StoredValue, A>, op2: OperatorFunction<A, B>): Observable<B>
  • pipe<A, B, C>(op1: OperatorFunction<StoredValue, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>): Observable<C>
  • pipe<A, B, C, D>(op1: OperatorFunction<StoredValue, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>, op4: OperatorFunction<C, D>): Observable<D>
  • pipe<A, B, C, D, E>(op1: OperatorFunction<StoredValue, 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<StoredValue, 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<StoredValue, 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<StoredValue, 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<StoredValue, 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<StoredValue>

  • Type parameters

    • A

    Parameters

    Returns Observable<A>

  • Type parameters

    • A

    • B

    Parameters

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

    Returns Observable<B>

  • Type parameters

    • A

    • B

    • C

    Parameters

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

    Returns Observable<C>

  • Type parameters

    • A

    • B

    • C

    • D

    Parameters

    • op1: OperatorFunction<StoredValue, 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<StoredValue, 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<StoredValue, 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<StoredValue, 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<StoredValue, 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<StoredValue, 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>

Private storageStream

subscribe

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

    Returns Subscription

  • Parameters

    • Optional next: undefined | function
    • Optional error: undefined | function
    • Optional complete: undefined | function

    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>

unmute

  • unmute(): void

unsubscribe

  • unsubscribe(): void
  • Returns void

Private writeValue

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc